From 4377bafcd42b9e6775fb0cd6353d041060d81ab0 Mon Sep 17 00:00:00 2001 From: Thierry Bugier Date: Tue, 14 Jan 2020 21:30:45 +0100 Subject: [PATCH] fix(glpiselectfield): restrict to items associatable to tickets restriction on per item basis, like software Signed-off-by: Thierry Bugier --- inc/fields/dropdownfield.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/inc/fields/dropdownfield.class.php b/inc/fields/dropdownfield.class.php index bc99d499e..3ffc61581 100644 --- a/inc/fields/dropdownfield.class.php +++ b/inc/fields/dropdownfield.class.php @@ -222,6 +222,12 @@ public function displayField($canEdit = true) { ]; $groups = implode("', '", $groups); } + // Check if helpdesk availability is fine tunable on a per item basis + if ($DB->fieldExists($itemtype::getTable(), 'is_helpdesk_visible')) { + $dparams_cond_crit[] = [ + 'is_helpdesk_visible' => '1', + ]; + } } }