Skip to content

Commit e468aa3

Browse files
committed
fix(targetticket): actors format
diferences exists between targettypes in format expected by GLPI
1 parent 5c64327 commit e468aa3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

inc/targetticket.class.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -901,6 +901,14 @@ public function save(PluginFormcreatorFormAnswer $formanswer): ?CommonDBTM {
901901
// Cleanup actors array
902902
$data = $this->cleanActors($data);
903903

904+
// Specific format for actors in tickets
905+
// @see CommonITILObject::setTechAndGroupFromItilCategory()
906+
if ($data['_users_id_assign'] === 0) {
907+
$data['_users_id_assign'] = [];
908+
$data['_users_id_assign_notif']['use_notification'] = [];
909+
$data['_users_id_assign_notif']['alternative_email'] = [];
910+
}
911+
904912
// Create the target ticket
905913
$data['_auto_import'] = true;
906914
if (!$ticketID = $ticket->add($data)) {

0 commit comments

Comments
 (0)