From ba2aafaf6f7495a457a94e7e9f162cb05d1d273c Mon Sep 17 00:00:00 2001 From: GregM Date: Wed, 14 Sep 2022 14:29:50 +0200 Subject: [PATCH] Update ActionComm type_code on email message ticket --- htdocs/ticket/class/ticket.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index df581d96fdc..1d7360b44a7 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -1732,6 +1732,7 @@ class Ticket extends CommonObject $error = 0; $now = dol_now(); + $send_email = GETPOST('send_email','int'); // Clean parameters if (isset($this->fk_track_id)) { @@ -1752,6 +1753,9 @@ class Ticket extends CommonObject if ($this->private) { $actioncomm->code = 'TICKET_MSG_PRIVATE'; } + if ($send_email > 0){ + $actioncomm->type_code = 'AC_EMAIL'; + } $actioncomm->socid = $this->socid; $actioncomm->label = $this->subject; $actioncomm->note_private = $this->message;