From ef858cdc5412e0466ccce9b74d562e643a00d618 Mon Sep 17 00:00:00 2001 From: Thierry Bugier Date: Tue, 7 Jun 2022 08:43:13 +0200 Subject: [PATCH] fix(issue): incomplete data on ticket creation --- hook.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hook.php b/hook.php index add0a3ba4..33dce0b1a 100644 --- a/hook.php +++ b/hook.php @@ -358,9 +358,10 @@ function plugin_formcreator_hook_add_ticket(CommonDBTM $item) { $issueName = $item->fields['name'] != '' ? addslashes($item->fields['name']) : '(' . $item->getID() . ')'; $issue = new PluginFormcreatorIssue(); $issue->add([ + 'name' => $issueName, + 'display_id' => 't_' . $item->getID(), 'items_id' => $item->getID(), 'itemtype' => 'Ticket', - 'name' => $issueName, 'status' => $validationStatus, 'date_creation' => $item->fields['date'], 'date_mod' => $item->fields['date_mod'], @@ -368,6 +369,8 @@ function plugin_formcreator_hook_add_ticket(CommonDBTM $item) { 'is_recursive' => '0', 'requester_id' => $requester['users_id'], 'comment' => addslashes($item->fields['content']), + 'users_id_recipient' => $item->fields['users_id_recipient'], + ]); }