Skip to content

Commit c473076

Browse files
committed
fix: remove tech group search option from service catalog
1 parent 230b33e commit c473076

File tree

1 file changed

+28
-25
lines changed

1 file changed

+28
-25
lines changed

inc/issue.class.php

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -690,34 +690,37 @@ public function rawSearchOptions() {
690690
}
691691
$tab[] = $newtab;
692692

693-
$tab[] = [
694-
'id' => '15',
695-
'table' => Group::getTable(),
696-
'field' => 'name',
697-
'name' => __('Technician group'),
698-
'datatype' => 'dropdown',
699-
'forcegroupby' => true,
700-
'massiveaction' => false,
701-
'nodisplay' => $hide_technician,
702-
'nosearch' => $hide_technician,
703-
'condition' => ['is_assign' => 1],
704-
'joinparams' => [
705-
'beforejoin' => [
706-
'table' => Group_Ticket::getTable(),
707-
'joinparams' => [
708-
'condition' => "AND NEWTABLE.`type` = '2'", // Assign
709-
'jointype' => 'child',
710-
'beforejoin' => [
711-
'table' => Ticket::getTable(),
712-
'joinparams' => [
713-
'jointype' => 'itemtype_item_revert',
714-
'specific_itemtype' => Ticket::class,
715-
],
693+
if (!Session::isCron() // no filter for cron
694+
&& Session::getCurrentInterface() != 'helpdesk') {
695+
$tab[] = [
696+
'id' => '15',
697+
'table' => Group::getTable(),
698+
'field' => 'name',
699+
'name' => __('Technician group'),
700+
'datatype' => 'dropdown',
701+
'forcegroupby' => true,
702+
'massiveaction' => false,
703+
'nodisplay' => $hide_technician,
704+
'nosearch' => $hide_technician,
705+
'condition' => ['is_assign' => 1],
706+
'joinparams' => [
707+
'beforejoin' => [
708+
'table' => Group_Ticket::getTable(),
709+
'joinparams' => [
710+
'condition' => "AND NEWTABLE.`type` = '2'", // Assign
711+
'jointype' => 'child',
712+
'beforejoin' => [
713+
'table' => Ticket::getTable(),
714+
'joinparams' => [
715+
'jointype' => 'itemtype_item_revert',
716+
'specific_itemtype' => Ticket::class,
717+
],
718+
]
716719
]
717720
]
718721
]
719-
]
720-
];
722+
];
723+
}
721724

722725
if (Plugin::isPluginActive('advform')) {
723726
$tab[] = PluginAdvformIssue::rawSearchOptionFormApproverGroup();

0 commit comments

Comments
 (0)