pluginsGLPI / escalade

GLPI Plugin escalade
http://www.teclib-edition.com
GNU General Public License v2.0
19 stars 31 forks source link

fix: ensure ticket status remains as 'new' after escalation #158

Closed ccailly closed 9 months ago

ccailly commented 10 months ago

!30921

Description

This PR addresses a bug in the plugin where tickets would automatically change to the status 'in progress' after an escalation task, even when the desired configuration was set to 'new'. The issue was due to the group assignment altering the status.

Changes

The fix involves a small change in the ticket.form.php file. A condition has been added to check if the last status of the ticket was 'incoming' and if the current status is 'incoming'. If both conditions are met, the _from_object key is set to true in the group ticket additional data variable. This key indicates to the add method that the status should not be altered during the group assignment.

stonebuzz commented 10 months ago

After modifying my configuration to match the original issue

image

If I escalate a ticket with incoming status, the incoming status is retained.

But If I escalate a ticket with inprogess status, the inprogess status is retained.

for me it doesn't matter what the original status is, the configured status should always be applied

stonebuzz commented 10 months ago

another point (to be fixed via this PR) The "do not change" option doesn't work (see my first comment)

stonebuzz commented 9 months ago

Using escalation here does not retain "new" status

image

From timeline action or from the actors form it's ok =)

image