File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -246,6 +246,7 @@ public function buildParams($rand = null) {
246
246
$ canViewAllHardware = Session::haveRight ('helpdesk_hardware ' , pow (2 , Ticket::HELPDESK_ALL_HARDWARE ));
247
247
$ canViewMyHardware = Session::haveRight ('helpdesk_hardware ' , pow (2 , Ticket::HELPDESK_MY_HARDWARE ));
248
248
$ canViewGroupHardware = Session::haveRight ('show_group_hardware ' , '1 ' );
249
+ $ target_ticket = (new \PluginFormcreatorTargetTicket ())->getTargetsForForm ($ form ->getID ());
249
250
$ groups = [];
250
251
if ($ canViewGroupHardware ) {
251
252
$ groups = $ this ->getMyGroups (Session::getLoginUserID ());
@@ -266,7 +267,7 @@ public function buildParams($rand = null) {
266
267
];
267
268
}
268
269
// Check if helpdesk availability is fine tunable on a per item basis
269
- if (Session:: getCurrentInterface () == " helpdesk " && $ DB ->fieldExists ($ itemtype ::getTable (), 'is_helpdesk_visible ' )) {
270
+ if ($ DB ->fieldExists ($ itemtype ::getTable (), 'is_helpdesk_visible ' ) && count ( $ target_ticket ) > 0 ) {
270
271
$ dparams_cond_crit [] = [
271
272
'is_helpdesk_visible ' => '1 ' ,
272
273
];
You can’t perform that action at this time.
0 commit comments