FIX 13.0 feedback of PR #18993: make ticket messages punctual events with attr percentage = -1

This commit is contained in:
atm-florian 2021-10-18 09:43:05 +02:00
parent bd7e3e57ca
commit 2ff75dfab4
2 changed files with 2 additions and 2 deletions

View File

@ -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');

View File

@ -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;