From 2ff75dfab4cccdb334b4b6952009fe632024899c Mon Sep 17 00:00:00 2001 From: atm-florian Date: Mon, 18 Oct 2021 09:43:05 +0200 Subject: [PATCH] FIX 13.0 feedback of PR #18993: make ticket messages punctual events with attr percentage = -1 --- htdocs/comm/action/card.php | 2 +- htdocs/ticket/class/ticket.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 0bbcf20a796..2a0371d4615 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -503,7 +503,7 @@ if (empty($reshook) && $action == 'update') $object->note_private = trim(GETPOST("note", "restricthtml")); $object->fk_element = GETPOST("fk_element", "int"); $object->elementtype = GETPOST("elementtype", "alphanohtml"); - if (!$datef && $percentage == 100 && !preg_match('/^TICKET_MSG/', $object->code)) + if (!$datef && $percentage == 100) { $error++; $donotclearsession = 1; setEventMessages($langs->transnoentitiesnoconv("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateEnd")), $object->errors, 'errors'); diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 20d63cea600..1c53217d4b3 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -1657,7 +1657,7 @@ class Ticket extends CommonObject $actioncomm->userassigned = array($user->id); $actioncomm->userownerid = $user->id; $actioncomm->datep = $now; - $actioncomm->percentage = 100; + $actioncomm->percentage = -1; $actioncomm->elementtype = 'ticket'; $actioncomm->fk_element = $this->id;