Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.9.7 - Problems escalating #218

Closed
andrepetinga opened this issue Jul 15, 2024 · 19 comments
Closed

2.9.7 - Problems escalating #218

andrepetinga opened this issue Jul 15, 2024 · 19 comments

Comments

@andrepetinga
Copy link

andrepetinga commented Jul 15, 2024

Hello.

  1. When If I make several escalations, the history is not showned correctly.

For example: Created a ticket and the Group assigned was "CONTACT CENTER DSI"

image

Then escalate (using escalate button) to UARS and the visual history doesn't show any previous group:

image

Then escalate (using escalate button) to UAS and it only shows the previous group:

image

LOGS:

[2024-07-15 11:13:47] glpiphplog.WARNING: *** PHP Warning (2): Undefined array key "assign" in .../glpi/marketplace/escalade/inc/ticket.class.php at line 108
Backtrace :
marketplace/escalade/hook.php:433 PluginEscaladeTicket::pre_item_update()
src/Plugin.php:1680 plugin_escalade_pre_item_update()
src/CommonDBTM.php:1610 Plugin::doHook()
src/Ticket.php:2440 CommonDBTM->update()
src/CommonITILActor.php:434 Ticket->updateDateMod()
src/Group_Ticket.php:66 CommonITILActor->post_addItem()
src/CommonDBTM.php:1343 Group_Ticket->post_addItem()
src/CommonITILObject.php:8757 CommonDBTM->add()
src/CommonITILObject.php:2868 CommonITILObject->updateActors()
src/Ticket.php:2225 CommonITILObject->post_addItem()
src/CommonDBTM.php:1343 Ticket->post_addItem()
front/ticket.form.php:80 CommonDBTM->add()
public/index.php:82 require()

[2024-07-15 11:13:47] glpiphplog.WARNING: *** PHP Warning (2): foreach() argument must be of type array|object, null given in .../glpi/marketplace/escalade/inc/ticket.class.php at line 108
Backtrace :
marketplace/escalade/hook.php:433 PluginEscaladeTicket::pre_item_update()
src/Plugin.php:1680 plugin_escalade_pre_item_update()
src/CommonDBTM.php:1610 Plugin::doHook()
src/Ticket.php:2440 CommonDBTM->update()
src/CommonITILActor.php:434 Ticket->updateDateMod()
src/Group_Ticket.php:66 CommonITILActor->post_addItem()
src/CommonDBTM.php:1343 Group_Ticket->post_addItem()
src/CommonITILObject.php:8757 CommonDBTM->add()
src/CommonITILObject.php:2868 CommonITILObject->updateActors()
src/Ticket.php:2225 CommonITILObject->post_addItem()
src/CommonDBTM.php:1343 Ticket->post_addItem()
front/ticket.form.php:80 CommonDBTM->add()
public/index.php:82 require()

  1. Another problem, is when we use the arrow icon to escalate.

image

It only shows a blank page and checking the LOG:

[2024-07-15 11:20:22] glpiphplog.WARNING: *** PHP Warning (2): Undefined array key "ticket_details" in .../glpi/marketplace/escalade/inc/ticket.class.php at line 519
Backtrace :
marketplace/escalade/front/climb_group.php:42 PluginEscaladeTicket::climb_group()
public/index.php:82 require()

[2024-07-15 11:20:22] glpiphplog.CRITICAL: *** Uncaught Exception TypeError: Unsupported operand types: null + array in .../glpi/marketplace/escalade/inc/ticket.class.php at line 524
Backtrace :
marketplace/escalade/front/climb_group.php:42 PluginEscaladeTicket::climb_group()
public/index.php:82 require()

  1. Another thing: If I escalate writing the group name, the "yellow task box" is not showned on the ticket history:

image

Only shows history text, not the "yellow task box":

image

@stonebuzz
Copy link
Contributor

this should fix this issue (i hope)

#212

@andrepetinga
Copy link
Author

andrepetinga commented Jul 15, 2024

Hello.
@stonebuzz. That fix only corrected the issue nr. 2.
But issues 1 and 3 are still present and is still writting on the LOGS:

[2024-07-15 14:36:42] glpiphplog.WARNING: *** PHP Warning (2): Undefined array key "assign" in .../glpi/marketplace/escalade/inc/ticket.class.php at line 108
Backtrace :
marketplace/escalade/hook.php:433 PluginEscaladeTicket::pre_item_update()
src/Plugin.php:1680 plugin_escalade_pre_item_update()
src/CommonDBTM.php:1610 Plugin::doHook()
src/Ticket.php:2440 CommonDBTM->update()
src/CommonITILActor.php:434 Ticket->updateDateMod()
src/Group_Ticket.php:66 CommonITILActor->post_addItem()
src/CommonDBTM.php:1343 Group_Ticket->post_addItem()
src/CommonITILObject.php:8757 CommonDBTM->add()
src/CommonITILObject.php:2868 CommonITILObject->updateActors()
src/Ticket.php:2225 CommonITILObject->post_addItem()
src/CommonDBTM.php:1343 Ticket->post_addItem()
front/ticket.form.php:80 CommonDBTM->add()
public/index.php:82 require()

[2024-07-15 14:36:42] glpiphplog.WARNING: *** PHP Warning (2): foreach() argument must be of type array|object, null given in .../glpi/marketplace/escalade/inc/ticket.class.php at line 108
Backtrace :
marketplace/escalade/hook.php:433 PluginEscaladeTicket::pre_item_update()
src/Plugin.php:1680 plugin_escalade_pre_item_update()
src/CommonDBTM.php:1610 Plugin::doHook()
src/Ticket.php:2440 CommonDBTM->update()
src/CommonITILActor.php:434 Ticket->updateDateMod()
src/Group_Ticket.php:66 CommonITILActor->post_addItem()
src/CommonDBTM.php:1343 Group_Ticket->post_addItem()
src/CommonITILObject.php:8757 CommonDBTM->add()
src/CommonITILObject.php:2868 CommonITILObject->updateActors()
src/Ticket.php:2225 CommonITILObject->post_addItem()
src/CommonDBTM.php:1343 Ticket->post_addItem()
front/ticket.form.php:80 CommonDBTM->add()
public/index.php:82 require()

@andrepetinga
Copy link
Author

andrepetinga commented Jul 16, 2024

Hello again @stonebuzz.
Made new tests today:

Regarding my first post:

Problem 1 is confirmed - Escalation history is not working properly. For example, it only shows up when we escalate using Escalate button. If we search for the group, the previous is not added to history.

Problem 3 is confirmed - The yellow private task mentioning the escalade option it's only being created when we escalate using Escalate button. Not using the search textbox or using "up arrow" (escalade history).

Found the errors mentioned on the first post when: ticket is created (we have a rule to assign a group), making a solution, rejecting a solution, using the "associate myself" button.

Errors are:

[2024-07-15 11:13:47] glpiphplog.WARNING: *** PHP Warning (2): Undefined array key "assign" in .../glpi/marketplace/escalade/inc/ticket.class.php at line 108
Backtrace :
marketplace/escalade/hook.php:433 PluginEscaladeTicket::pre_item_update()
src/Plugin.php:1680 plugin_escalade_pre_item_update()
src/CommonDBTM.php:1610 Plugin::doHook()
src/Ticket.php:2440 CommonDBTM->update()
src/CommonITILActor.php:434 Ticket->updateDateMod()
src/Group_Ticket.php:66 CommonITILActor->post_addItem()
src/CommonDBTM.php:1343 Group_Ticket->post_addItem()
src/CommonITILObject.php:8757 CommonDBTM->add()
src/CommonITILObject.php:2868 CommonITILObject->updateActors()
src/Ticket.php:2225 CommonITILObject->post_addItem()
src/CommonDBTM.php:1343 Ticket->post_addItem()
front/ticket.form.php:80 CommonDBTM->add()
public/index.php:82 require()

[2024-07-15 11:13:47] glpiphplog.WARNING: *** PHP Warning (2): foreach() argument must be of type array|object, null given in .../glpi/marketplace/escalade/inc/ticket.class.php at line 108
Backtrace :
marketplace/escalade/hook.php:433 PluginEscaladeTicket::pre_item_update()
src/Plugin.php:1680 plugin_escalade_pre_item_update()
src/CommonDBTM.php:1610 Plugin::doHook()
src/Ticket.php:2440 CommonDBTM->update()
src/CommonITILActor.php:434 Ticket->updateDateMod()
src/Group_Ticket.php:66 CommonITILActor->post_addItem()
src/CommonDBTM.php:1343 Group_Ticket->post_addItem()
src/CommonITILObject.php:8757 CommonDBTM->add()
src/CommonITILObject.php:2868 CommonITILObject->updateActors()
src/Ticket.php:2225 CommonITILObject->post_addItem()
src/CommonDBTM.php:1343 Ticket->post_addItem()
front/ticket.form.php:80 CommonDBTM->add()
public/index.php:82 require()

New problem found: If we have a requester or observer with an email (external user), the observer email will be deleted if escalade using the Escalate button or the "up arrow" (escalade history). The observer will stay if we escalade searching for the group.
And we can see this on the LOGS:

[2024-07-16 16:35:53] glpiphplog.WARNING:   *** PHP Warning (2): Undefined array key "alternative_email" in .../glpi/src/CommonITILObject.php at line 9943
  Backtrace :
  src/Ticket.php:1041                                CommonITILObject->transformActorsInput()
  src/CommonDBTM.php:1612                            Ticket->prepareInputForUpdate()
  marketplace/escalade/inc/ticket.class.php:520      CommonDBTM->update()
  marketplace/escalade/front/climb_group.php:40      PluginEscaladeTicket::climb_group()
  public/index.php:82                                require()

@andrepetinga
Copy link
Author

andrepetinga commented Jul 22, 2024

Hello @stonebuzz.
Today I updated to 2.9.8 version, and then apllied 2 fixes: #219 and #212.
Made new tests today and regarding my last post:

SAME RESULT ->Problem 1 is confirmed - Escalation history is not working properly. For example, it only shows up when we escalate using Escalate button. If we search for the group, the previous is not added to history.

SAME RESULT -> Problem 3 is confirmed - The yellow private task mentioning the escalade option it's only being created when we escalate using Escalate button. Not using the search textbox or using "up arrow" (escalade history).

NEW RESULT -> No errors found when: ticket is created (we have a rule to assign a group), making a solution, rejecting a solution, using the "associate myself" button no longer writes those errors on the logs.

But using the "associate myself" button is writting a new error, since I applied the #219 patch.

SAME RESULT -> New problem found: If we have a requester or observer with an email (external user), the observer email will be deleted if escalade using the Escalate button or the "up arrow" (escalade history). The observer will stay if we escalade searching for the group.
And we can see this on the LOGS:

2024-07-22 12:07:37] glpiphplog.WARNING:   *** PHP Warning (2): Undefined array key "alternative_email" in .../glpi/src/CommonITILObject.php at line 9884
Backtrace :
src/Ticket.php:1041                                CommonITILObject->transformActorsInput()
src/CommonDBTM.php:1618                            Ticket->prepareInputForUpdate()
marketplace/escalade/front/ticket.form.php:70      CommonDBTM->update()
public/index.php:82                                require()

@ftoledo
Copy link

ftoledo commented Aug 22, 2024

Hi @andrepetinga What version of glpi are you using?

@andrepetinga
Copy link
Author

Hi @andrepetinga What version of glpi are you using?

10.0.16

@stonebuzz
Copy link
Contributor

Hi @andrepetinga

SAME RESULT -> Problem 3 is confirmed - The yellow private task mentioning the escalade option it's only being created when we escalate using Escalate button. Not using the search textbox or using "up arrow" (escalade history).

Should be fixed by #230

@stonebuzz
Copy link
Contributor

Hi @andrepetinga

NEW RESULT -> No errors found when: ticket is created (we have a rule to assign a group), making a solution, rejecting a solution, using the "associate myself" button no longer writes those errors on the logs.

Should be fixed by #231

@stonebuzz
Copy link
Contributor

Hi @andrepetinga @ftoledo

can you retry by using "main" branch ?

after testing, the recent PR corrected the problem

@andrepetinga
Copy link
Author

Hi @andrepetinga

SAME RESULT -> Problem 3 is confirmed - The yellow private task mentioning the escalade option it's only being created when we escalate using Escalate button. Not using the search textbox or using "up arrow" (escalade history).

Should be fixed by #230

Hi @stonebuzz.
Sorry for the delay...

Just picked up my installed 2.9.8 version and only applied the #230.
What I did was to manually change the "'_plugin_escalade_no_history' => true" to "'_plugin_escalade_no_history' => false"

Testing:

When using the Escalade Button -> Still OK
When using the Arrow from the History -> Now it's OK
When searching the a group -> Still NOT OK!

image

As you can see in the print, the Group "UGSI" was added at 14:43, and no Private task

@stonebuzz
Copy link
Contributor

Hi @andrepetinga

can you retry with main branch (not 2.9.8 + one patch)

@andrepetinga
Copy link
Author

andrepetinga commented Sep 4, 2024

Hi @andrepetinga

NEW RESULT -> No errors found when: ticket is created (we have a rule to assign a group), making a solution, rejecting a solution, using the "associate myself" button no longer writes those errors on the logs.

Should be fixed by #231

Hi @stonebuzz.

Continued with my installed 2.9.8 version (now also with #230 correction) and only applied the #231.
What I did was to manually change the "$tickets_id = $item->input['id'];" to "$tickets_id = $item->input['id'] ?? $item->fields['id'];"

Testing:

No error on the logs when using the "associate myself" button.

@andrepetinga
Copy link
Author

Hi @andrepetinga

can you retry with main branch (not 2.9.8 + one patch)

Yes, that was my plan :)

And yes, using the main branch:

When using the Escalade Button -> OK!
When using the Arrow from the History -> OK!
When searching the a group -> OK!

@andrepetinga
Copy link
Author

Hello @stonebuzz. Today I updated to 2.9.8 version, and then apllied 2 fixes: #219 and #212. Made new tests today and regarding my last post:

SAME RESULT ->Problem 1 is confirmed - Escalation history is not working properly. For example, it only shows up when we escalate using Escalate button. If we search for the group, the previous is not added to history.

SAME RESULT -> Problem 3 is confirmed - The yellow private task mentioning the escalade option it's only being created when we escalate using Escalate button. Not using the search textbox or using "up arrow" (escalade history).

NEW RESULT -> No errors found when: ticket is created (we have a rule to assign a group), making a solution, rejecting a solution, using the "associate myself" button no longer writes those errors on the logs.

But using the "associate myself" button is writting a new error, since I applied the #219 patch.

SAME RESULT -> New problem found: If we have a requester or observer with an email (external user), the observer email will be deleted if escalade using the Escalate button or the "up arrow" (escalade history). The observer will stay if we escalade searching for the group. And we can see this on the LOGS:

2024-07-22 12:07:37] glpiphplog.WARNING:   *** PHP Warning (2): Undefined array key "alternative_email" in .../glpi/src/CommonITILObject.php at line 9884
Backtrace :
src/Ticket.php:1041                                CommonITILObject->transformActorsInput()
src/CommonDBTM.php:1618                            Ticket->prepareInputForUpdate()
marketplace/escalade/front/ticket.form.php:70      CommonDBTM->update()
public/index.php:82                                require()

Hello @stonebuzz.

So, after installing the main branch of 2.9.8 (no patches added), I repeated all my tests and:

NEW RESULT ->Problem 1 no longer exists - Escalation history is now working properly.

NEW RESULT -> Problem 3 no longer exists - The yellow private task mentioning the escalade option it's being created.

NEW RESULT -> Now, using the "associate myself" button no longer raises an error on the log.

SAME RESULT -> New problem found: If we have a requester or observer with an email (external user), the observer email will be deleted if escalade using the Escalate button or the "up arrow" (escalade history). The observer will stay if we escalade searching for the group.

And we can see this on the LOGS:

Using the "up arrow" (escalade history):

[2024-09-04 15:24:03] glpiphplog.WARNING:   *** PHP Warning (2): Undefined array key "alternative_email" in …/glpi/src/CommonITILObject.php at line 9884
  Backtrace :
  src/Ticket.php:1041                                CommonITILObject->transformActorsInput()
  src/CommonDBTM.php:1618                            Ticket->prepareInputForUpdate()
  marketplace/escalade/inc/ticket.class.php:509      CommonDBTM->update()
  marketplace/escalade/front/climb_group.php:40      PluginEscaladeTicket::climb_group()
  public/index.php:82                                require()

Using the Escalate button:

[2024-09-04 15:18:30] glpiphplog.WARNING:   *** PHP Warning (2): Undefined array key "alternative_email" in …/glpi/src/CommonITILObject.php at line 9884
  Backtrace :
  src/Ticket.php:1041                                CommonITILObject->transformActorsInput()
  src/CommonDBTM.php:1618                            Ticket->prepareInputForUpdate()
  marketplace/escalade/front/ticket.form.php:70      CommonDBTM->update()
  public/index.php:82                                require()

Almost there!!! :)

@stonebuzz
Copy link
Contributor

Can you (please) open a new issue ?

@stonebuzz
Copy link
Contributor

I'll consider this one ‘finished’ (I was waiting for your feedback as well as the others).

@andrepetinga
Copy link
Author

Just created the new issue #241

@ftoledo
Copy link

ftoledo commented Sep 5, 2024

Hi @andrepetinga @ftoledo

can you retry by using "main" branch ?

after testing, the recent PR corrected the problem

hi @stonebuzz i can confirm that main branch has solved the issue.
thanks!

@stonebuzz
Copy link
Contributor

in view of the recent progress and feedback from the community, I'm closing this issue.

release coming soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants