tomolimo / processmaker

GLPI plugin that provides an interface with ProcessMaker (http://www.processmaker.com/)
31 stars 11 forks source link

Case variable GLPI_ITEM_SET_STATUS #68

Closed rohit-ambre-uno closed 6 years ago

rohit-ambre-uno commented 6 years ago

Hi, I have been coming across this issue long time and have being trying to come over that. I'm trying to change state of the ticket on the basis of a trigger, but the thing is I've tried testing it with at least 40 to 50 tickets but have been unsuccessful with it. What I tried is added a glpi variable i.e. @@GLPI_ITEM_SET_STATUS and setting it a value for example @@GLPI_ITEM_SET_STATUS=2 also @%GLPI_ITEM_SET_STATUS=2 (Which is the correct representation for an integer) I'd appreciate if you could give me an example for setting this variable. Thank you.

tomolimo commented 6 years ago

Hello @rohit-ambre-uno Just as a reminder, here are the values for the item statuses: // STATUS const INCOMING = 1; // new const ASSIGNED = 2; // assign const PLANNED = 3; // plan const WAITING = 4; // waiting const SOLVED = 5; // solved const CLOSED = 6; // closed const ACCEPTED = 7; // accepted const OBSERVED = 8; // observe const EVALUATION = 9; // evaluation const APPROVAL = 10; // approbation const TEST = 11; // test const QUALIFICATION = 12; // qualification For a ticket, only the 6 first are used.

Any ways to assign a value to this GLPI_ITEM_SET_STATUS variable will be ok (PHP will cast the value to the right type when necessary). Exemple: in PHP if you test a string with an integer like this 2 == "2" will be true as "2" will be converted to an integer before doing the ==, and so on.

The only thing that can be an issue would be to set the status to the same value: setting 2 when it's already 2 will do nothing :smiley: But I assume you did not this, so let's investigate what could be the issue.

Could you check in the log files of GLPI and in the log files of PM server, if there is any error that can help us?

Could you also give screen shots of the tickets before the trigger execution, and after the trigger execution?

Thank you. Regards, Tomolimo

rohit-ambre-uno commented 6 years ago

I found that Ticket state is getting changed to waiting and solved i.e.(4 and 5) but its not getting changed to assign and plan state. and there is no error in error logs.

tomolimo commented 6 years ago

Hello @rohit-ambre-uno Could you remind me of the the version of the plugin? Thank you Regards Tomolimo

rohit-ambre-uno commented 6 years ago

I'm using processmaker_3.2.8

tomolimo commented 6 years ago

Ok then I believe that there is a bug...

rohit-ambre-uno commented 6 years ago

Hi @tomolimo, We found that, Ticket state cannot be changed to processing and planned unless it has someone assigned to it. Hence ticket state was not getting change as there was no one assigned while I was creating the ticket via self service profile. so it is not a bug I suppose.

Thank you @tomolimo

tomolimo commented 6 years ago

Hello @rohit-ambre-uno,

You're right, when a ticket is not assigned to a tech, it's not possible to switch to 'Assigned' nor 'Planned' status. It's a restriction of GLPI itself. So I close this issue.

Thank you Regards, Tomolimo