From e468aa350de569991274d97e1af7ce2fca7ed994 Mon Sep 17 00:00:00 2001 From: Thierry Bugier Date: Fri, 22 Mar 2024 11:16:37 +0100 Subject: [PATCH] fix(targetticket): actors format diferences exists between targettypes in format expected by GLPI --- inc/targetticket.class.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/inc/targetticket.class.php b/inc/targetticket.class.php index 6c49f2aeb..6112a6518 100644 --- a/inc/targetticket.class.php +++ b/inc/targetticket.class.php @@ -901,6 +901,14 @@ public function save(PluginFormcreatorFormAnswer $formanswer): ?CommonDBTM { // Cleanup actors array $data = $this->cleanActors($data); + // Specific format for actors in tickets + // @see CommonITILObject::setTechAndGroupFromItilCategory() + if ($data['_users_id_assign'] === 0) { + $data['_users_id_assign'] = []; + $data['_users_id_assign_notif']['use_notification'] = []; + $data['_users_id_assign_notif']['alternative_email'] = []; + } + // Create the target ticket $data['_auto_import'] = true; if (!$ticketID = $ticket->add($data)) {