Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0
This commit is contained in:
commit
2a41e1f714
4 changed files with 8 additions and 4 deletions
|
|
@ -4445,7 +4445,11 @@ abstract class CommonObject
|
|||
}
|
||||
}
|
||||
|
||||
$this->context = array_merge($this->context, array('newstatus' => $status));
|
||||
|
||||
if ($trigkey) {
|
||||
$this->oldcopy = dol_clone($this);
|
||||
|
||||
// Call trigger
|
||||
$result = $this->call_trigger($trigkey, $user);
|
||||
if ($result < 0) {
|
||||
|
|
|
|||
|
|
@ -578,7 +578,7 @@ if (empty($reshook)) {
|
|||
if ($object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')) >= 0) {
|
||||
// prevent browser refresh from reopening ticket several times
|
||||
if ($object->status == Ticket::STATUS_CLOSED || $object->status == Ticket::STATUS_CANCELED) {
|
||||
$res = $object->setStatut(Ticket::STATUS_ASSIGNED);
|
||||
$res = $object->setStatut(Ticket::STATUS_ASSIGNED, null, '', 'TICKET_MODIFY');
|
||||
if ($res) {
|
||||
// Log action in ticket logs table
|
||||
//$log_action = $langs->trans('TicketLogReopen');
|
||||
|
|
@ -636,7 +636,7 @@ if (empty($reshook)) {
|
|||
if ($object->fetch(GETPOST('id', 'int'), GETPOST('track_id', 'alpha')) >= 0) {
|
||||
$new_status = GETPOST('new_status', 'int');
|
||||
$old_status = $object->status;
|
||||
$res = $object->setStatut($new_status);
|
||||
$res = $object->setStatut($new_status, null, '', 'TICKET_MODIFY');
|
||||
if ($res) {
|
||||
// Log action in ticket logs table
|
||||
$log_action = $langs->trans('TicketLogStatusChanged', $langs->transnoentities($object->statuts_short[$old_status]), $langs->transnoentities($object->statuts_short[$new_status]));
|
||||
|
|
|
|||
|
|
@ -2823,7 +2823,7 @@ class Ticket extends CommonObject
|
|||
if (($object->status < self::STATUS_IN_PROGRESS && !$user->socid && !$private) ||
|
||||
($object->status > self::STATUS_IN_PROGRESS && $public_area)
|
||||
) {
|
||||
$object->setStatut(3);
|
||||
$object->setStatut(3, null, '', 'TICKET_MODIFY');
|
||||
}
|
||||
return 1;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ if (empty($reshook)) {
|
|||
$result = $objecttmp->fetch($toselectid);
|
||||
if ($result > 0) {
|
||||
if ($objecttmp->status == Ticket::STATUS_CLOSED || $objecttmp->status == Ticket::STATUS_CANCELED) {
|
||||
$result = $objecttmp->setStatut(Ticket::STATUS_ASSIGNED);
|
||||
$result = $objecttmp->setStatut(Ticket::STATUS_ASSIGNED, null, '', 'TICKET_MODIFY');
|
||||
if ($result < 0) {
|
||||
setEventMessages($objecttmp->error, $objecttmp->errors, 'errors');
|
||||
$error++;
|
||||
|
|
|
|||
Loading…
Reference in a new issue