diff --git a/inc/targetticket.class.php b/inc/targetticket.class.php index 1dd2538d1..84b7bfaec 100644 --- a/inc/targetticket.class.php +++ b/inc/targetticket.class.php @@ -1023,7 +1023,7 @@ protected function showAssociateSettings($rand) { ], ]); foreach ($rows as $row) { - $options['items_id'][$row['itemtype']][$row['id']] = $row['id']; + $options['items_id'][$row['itemtype']][$row['id']] = $row['items_id']; } Item_Ticket::itemAddForm(new Ticket(), $options); echo ''; @@ -1090,8 +1090,9 @@ protected function setTargetAssociatedItem(array $data, PluginFormcreatorFormAns 'NOT' => ['itemtype' => [PluginFormcreatorTargetTicket::class, Ticket::class]], ], ]); + $data['items_id'] = []; foreach ($rows as $row) { - $data['items_id'] = [$row['itemtype'] => [$row['items_id'] => $row['items_id']]]; + $data['items_id'][$row['itemtype']] [$row['items_id']] = $row['items_id']; } break;