Merge pull request #23267 from OPEN-DSI/develop_new_auto_set_status_ticket_to_in_progress_when_a_client_answered

NEW : set ticket status to answered if the client has answered from the public interface
This commit is contained in:
Laurent Destailleur 2022-12-22 14:16:58 +01:00 committed by GitHub
commit 617afa5669
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2677,7 +2677,10 @@ class Ticket extends CommonObject
}
// Set status to "answered" if not set yet, but only if internal user and not private message
if ($object->status < 3 && !$user->socid && !$private) {
// Or set status to "answered" if the client has answered and if the ticket has started
if (($object->status < self::STATUS_IN_PROGRESS && !$user->socid && !$private) ||
($object->status > self::STATUS_IN_PROGRESS && $public_area)
) {
$object->setStatut(3);
}
return 1;