tomolimo / processmaker

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

When the ticket is automatically resolved, no template is assigned. #143

Closed kofe88 closed 2 years ago

kofe88 commented 2 years ago

Describe the bug Hello!

When the ticket is automatically resolved, no template is assigned.

There is a solution template "Template 1" with id 1:

image

There is a solution type "Type 2" with id 2:

image

A trigger has been created in PM with the following content:

image

Assigned in the last Task in the "After routing" section

image

When the last Task is executed, the ticket is closed with the solution type "Type 2", but without a template.

image

image

tomolimo commented 2 years ago

Hello @kofe88 Could you post the version of GLPI and of PM server, and of PM plugin? Could post the pmx file (process export) so that I can try to reproduce this issue? At least I need the minimal process that reproduce this issue, I don't need the complete process. Thank you Regards, Tomolimo

kofe88 commented 2 years ago

Hello @kofe88 Could you post the version of GLPI and of PM server, and of PM plugin? Could post the pmx file (process export) so that I can try to reproduce this issue? At least I need the minimal process that reproduce this issue, I don't need the complete process. Thank you Regards, Tomolimo

Hi!

GLPI 9.5.6

processmaker Name: Process Maker Version: 4.0.8 State: Enabled

ProcessMaker Ver. 3.3.0-community-RE-1.7

Тестовый_процесс_2-9.zip

kofe88 commented 2 years ago

@tomolimo Hello! Сongratulations on the past holidays!) Do you have any ideas?

tomolimo commented 2 years ago

Hello @kofe88 I've traced the issue till the root cause: in GLPI 9.5 the solutions are no longer in the items, They are in a separate table... That's the root cause. I'm going to prepare a new release for today. Thank you, Regards, Tomolimo

tomolimo commented 2 years ago

Hello @kofe88 The 4.0.11 release is fixing this issue.

To add a solution to a Ticket, you need to set either GLPI_ITEM_SET_SOLUTION_TEMPLATE_ID or GLPI_ITEM_SET_SOLUTION_TYPE_ID, and you may optionnaly set the GLPI_ITEM_APPEND_TO_SOLUTION_DESCRIPTION

To solve a Ticket, you must use the GLPI_ITEM_STATUS and the GLPI_ITEM_CAN_BE_SOLVED

Example of a PM trigger to solve a Ticket:

@@GLPI_ITEM_SET_SOLUTION_TEMPLATE_ID = 16; // to define the template to be used
@@GLPI_ITEM_STATUS = 5; // = solved
@@GLPI_ITEM_CAN_BE_SOLVED = 1; // to authorize solving even if the current PM case is not completed

Thank you Regards, Tomolimo