From b7019c073ae713bfb10f7aef97edb5dee6298c81 Mon Sep 17 00:00:00 2001 From: CamilleBeau <51176779+CamilleBeau@users.noreply.github.com> Date: Thu, 1 Feb 2024 14:53:06 -0500 Subject: [PATCH] [issue_tracker] Fix inactive user query (#8904) This fixes the logic in the inactive users query for the assignee drop down of the issue tracker. The query was missing brackets in the logic and was querying active users in the inactive users array. This resulted in all users being unset from the assignees object for users who do not have the "access_all_profiles" permission. With brackets, users without the "access_all_profiles" permission should be able to see the appropriate users in the assignee drop down of a new issue. --- modules/issue_tracker/php/edit.class.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/issue_tracker/php/edit.class.inc b/modules/issue_tracker/php/edit.class.inc index b4705d6f839..15710ac1a56 100644 --- a/modules/issue_tracker/php/edit.class.inc +++ b/modules/issue_tracker/php/edit.class.inc @@ -96,7 +96,7 @@ class Edit extends \NDB_Page implements ETagCalculator $inactive_users_expanded = $db->pselect( "SELECT DISTINCT u.Real_name, u.UserID FROM users u LEFT JOIN user_psc_rel upr ON (upr.UserID=u.ID) - WHERE FIND_IN_SET(upr.CenterID,:CenterID) OR (upr.CenterID=:DCC) + WHERE (FIND_IN_SET(upr.CenterID,:CenterID) OR (upr.CenterID=:DCC)) AND Active='N'", [ 'CenterID' => $CenterID,