Commit d111c802 authored by Cédric Anne's avatar Cédric Anne Committed by Johan Cwiklinski

Fix filtering of used items in tickets items

parent 833d184d
...@@ -411,14 +411,7 @@ class Item_Ticket extends CommonDBRelation{ ...@@ -411,14 +411,7 @@ class Item_Ticket extends CommonDBRelation{
self::dropdownMyDevices($dev_user_id, $ticket->fields["entities_id"], null, 0, ['tickets_id' => $instID]); self::dropdownMyDevices($dev_user_id, $ticket->fields["entities_id"], null, 0, ['tickets_id' => $instID]);
} }
$data = array_keys(getAllDatasFromTable('glpi_items_tickets')); $used = self::getUsedItems($instID);
$used = [];
if (!empty($data)) {
foreach ($data as $val) {
$used[$val['itemtype']] = $val['id'];
}
}
self::dropdownAllDevices("itemtype", null, 0, 1, $dev_user_id, $ticket->fields["entities_id"], ['tickets_id' => $instID, 'used' => $used, 'rand' => $rand]); self::dropdownAllDevices("itemtype", null, 0, 1, $dev_user_id, $ticket->fields["entities_id"], ['tickets_id' => $instID, 'used' => $used, 'rand' => $rand]);
echo "<span id='item_ticket_selection_information$rand'></span>"; echo "<span id='item_ticket_selection_information$rand'></span>";
echo "</td><td class='center' width='30%'>"; echo "</td><td class='center' width='30%'>";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment