From b0e2f872e2f892649041a91e81e852f925a19511 Mon Sep 17 00:00:00 2001 From: tnegre Date: Tue, 19 Sep 2023 16:56:34 +0200 Subject: [PATCH] FIX when creating tickets from public interface and backoffice at the same time, values from the ticket created on public interface were not erased during creation from backoffice. --- htdocs/ticket/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index 29098d2100a35..c4ac9375b8b72 100755 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -184,7 +184,7 @@ $object->ref = $getRef; } - $object->fk_soc = GETPOST("socid", 'int') > 0 ? GETPOST("socid", 'int') : 0; + $object->fk_soc = $object->socid = GETPOST("socid", 'int') > 0 ? GETPOST("socid", 'int') : 0; $object->subject = GETPOST("subject", 'alphanohtml'); $object->message = GETPOST("message", 'restricthtml'); @@ -194,7 +194,7 @@ $object->category_label = $langs->trans($langs->getLabelFromKey($db, $object->category_code, 'c_ticket_category', 'code', 'label')); $object->severity_code = GETPOST("severity_code", 'alpha'); $object->severity_label = $langs->trans($langs->getLabelFromKey($db, $object->severity_code, 'c_ticket_severity', 'code', 'label')); - $object->email_from = $user->email; + $object->email_from = $object->origin_email = $user->email; $notifyTiers = GETPOST("notify_tiers_at_create", 'alpha'); $object->notify_tiers_at_create = empty($notifyTiers) ? 0 : 1;