Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[issue_tracker] Do not display inactive users in issue form #8841

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions modules/issue_tracker/php/edit.class.inc
Expand Up @@ -66,7 +66,7 @@ class Edit extends \NDB_Page implements ETagCalculator
$inactive_users = [];
if ($user->hasPermission('access_all_profiles')) {
$assignee_expanded = $db->pselect(
"SELECT Real_name, UserID FROM users",
"SELECT Real_name, UserID FROM users WHERE Active='Y'",
charlottesce marked this conversation as resolved.
Show resolved Hide resolved
[]
);

Expand All @@ -84,7 +84,8 @@ class Edit extends \NDB_Page implements ETagCalculator
$assignee_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='Y'",
[
'CenterID' => $CenterID,
'DCC' => $DCCID,
Expand Down Expand Up @@ -113,7 +114,7 @@ class Edit extends \NDB_Page implements ETagCalculator

$otherWatchers = [];
$potential_watchers_expanded = $db->pselect(
"SELECT Real_name, UserID FROM users",
"SELECT Real_name, UserID FROM users WHERE Active='Y'",
[]
);
foreach ($potential_watchers_expanded as $w_row) {
Expand Down
4 changes: 2 additions & 2 deletions modules/issue_tracker/php/issue_tracker.class.inc
Expand Up @@ -115,7 +115,7 @@ class Issue_Tracker extends \NDB_Menu_Filter_Form
//reporters
$reporters = [];
$reporter_expanded = $db->pselect(
"SELECT u.UserID,
"SELECT DISTINCT u.UserID,
u.Real_name
FROM issues i
INNER JOIN users u
Expand All @@ -129,7 +129,7 @@ class Issue_Tracker extends \NDB_Menu_Filter_Form
//assignees
$assignees = [];
$assignee_expanded = $db->pselect(
"SELECT u.UserID,
"SELECT DISTINCT u.UserID,
u.Real_name
FROM issues i
INNER JOIN users u
Expand Down