diff --git a/inc/issue.class.php b/inc/issue.class.php index 9856fd2c0..551a4081c 100644 --- a/inc/issue.class.php +++ b/inc/issue.class.php @@ -491,11 +491,16 @@ public function getTicketsForDisplay($options) { public function rawSearchOptions() { $tab = []; $hide_technician = false; + $hide_technician_group = false; if (!Session::isCron()) { - $hide_technician = \Entity::getUsedConfig( - 'anonymize_support_agents', - Session::getActiveEntity() - ); + $user = new User(); + if (empty($user->getAnonymizedName(Session::getActiveEntity()))) { + $hide_technician = true; + } + $group = new Group(); + if (empty($group->getAnonymizedName(Session::getActiveEntity()))) { + $hide_technician_group = true; + } } $tab[] = [ @@ -743,8 +748,8 @@ public function rawSearchOptions() { 'datatype' => 'dropdown', 'forcegroupby' => true, 'massiveaction' => false, - 'nodisplay' => $hide_technician, - 'nosearch' => $hide_technician, + 'nodisplay' => $hide_technician_group, + 'nosearch' => $hide_technician_group, 'condition' => ['is_assign' => 1], 'joinparams' => [ 'beforejoin' => [