From 8a9166baa556648d4fdd09bc22d7ce44c3703803 Mon Sep 17 00:00:00 2001 From: oscim Date: Fri, 19 Jul 2024 10:53:56 +0200 Subject: [PATCH] Update card.php proposal update ticket card for put event in trigger if status is changed --- htdocs/ticket/card.php | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index 719c24c8a49a0..037c294bb9d81 100644 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -599,8 +599,27 @@ // Reopen ticket if ($object->fetch(GETPOSTINT('id'), GETPOST('track_id', 'alpha')) >= 0) { $new_status = GETPOSTINT('new_status'); + + // add support event in trigger + if($new_status == 0) + $trig = '_NOT_READ'; + elseif($new_status == 1) + $trig = '_READ'; + elseif($new_status == 2) + $trig = '_ASSIGNED'; + elseif($new_status == 3) + $trig = '_IN_PROGRESS'; + elseif($new_status == 5) + $trig = '_NEED_MORE_INFO'; + elseif($new_status == 7) + $trig = '_WAITING'; + elseif($new_status == 8) + $trig = '_CLOSED'; + elseif($new_status == 9) + $trig = '_CANCELED'; + //$old_status = $object->status; - $res = $object->setStatut($new_status); + $res = $object->setStatut($new_status, null, '', 'TICKET'.$trig); if ($res) { $url = 'card.php?track_id=' . $object->track_id; header("Location: " . $url);