Feature #15201
closedFilter "Assignee" should contain locked users
Added by Jan Niggemann (redmine.org team member) about 11 years ago. Updated 11 months ago.
0%
Description
Scenario
User leaves company -> profile gets locked
User still has issues assigned, but it's not possible to set a filter "Assignee=UserWhoLeft"
Files
15201_include_locked_members_in_assignee_users.patch (2.13 KB) 15201_include_locked_members_in_assignee_users.patch | Marius BĂLTEANU, 2017-05-14 08:48 | ||
group_by_status.png (182 KB) group_by_status.png | Marius BĂLTEANU, 2017-09-25 23:44 | ||
author_by_status.png (171 KB) author_by_status.png | Marius BĂLTEANU, 2017-09-25 23:51 | ||
15201_include_locked_members_in_assignee_users_v2.patch (5.87 KB) 15201_include_locked_members_in_assignee_users_v2.patch | Marius BĂLTEANU, 2017-10-08 19:00 | ||
without_sysadmin.png (17.1 KB) without_sysadmin.png | ryou soda, 2018-11-27 09:58 | ||
with_sysadmin.png (17.3 KB) with_sysadmin.png | ryou soda, 2018-11-27 09:58 |
Related issues
Updated by Gurvan Le Dromaguet about 11 years ago
I suppose the best would be an option in Redmine settings to allow or not the querying on locked users.
Updated by Mischa The Evil about 11 years ago
Jan Niggemann (redmine.org team member) wrote:
Scenario
User leaves company -> profile gets locked
User still has issues assigned, but it's not possible to set a filter "Assignee=UserWhoLeft"
Indeed, at least not using the UI. Using some URL mangling (see #4501, #8160 and #13443) you can still create a query using locked users as assignee.
Working example of formatted URL where user with ID 10 is locked...Working example of formatted URL where user with ID 10 is locked...
http://redmine.host.tld/projects/demoproject/issues?utf8=%E2%9C%93&set_filter=1 &f%5B%5D=status_id &op%5Bstatus_id%5D=o &f%5B%5D=assigned_to_id &op%5Bassigned_to_id%5D=%3D &v%5Bassigned_to_id%5D%5B%5D=10 &f%5B%5D= &c%5B%5D=tracker &c%5B%5D=status &c%5B%5D=priority &c%5B%5D=subject &c%5B%5D=assigned_to &c%5B%5D=updated_on &group_by=
If it is decided that locked users are getting included in possible filter values, I'd strongly prefer to distinct them clearly (using HTML optgroup
or so).
Updated by Jean-Philippe Lang about 11 years ago
- Tracker changed from Defect to Feature
Updated by Toshi MARUYAMA almost 11 years ago
- Has duplicate Defect #15602: Can not filter issues with criteria assigned_to equal to an unaffected user who previously worked on the project added
Updated by Luis Serrano Aranda over 10 years ago
I think you should add this feature for more filters like autor, and all the filters with a user.
Updated by Toshi MARUYAMA about 10 years ago
- Related to Feature #11069: Ability to search tasks of Locked Users added
Updated by Henning Kröger over 8 years ago
+1
We are missing locked users in the filters for time entries too. I think this is related to this issue, do you agree?
Updated by Toshi MARUYAMA over 8 years ago
- Category changed from Issues to Issues filter
Updated by Sonia Zh about 8 years ago
+1
and agree as well with Henning Kroger regarding time_entries. If someone left from the company half way of a version and we want to display the timelog report for all issues related to the version. The timelog from the locked-user won't appear in the timelog report. The total hours spent for the released version won't be correct.
Updated by Jürgen Depicker over 7 years ago
+1
and same remark regarding spent time on an issue (timelog report) - time logs should still show hours spent by users who are no longer active, since the time was spent (and paid) after all :).
Updated by Marius BĂLTEANU over 7 years ago
- File 15201_include_locked_members_in_assignee_users.patch 15201_include_locked_members_in_assignee_users.patch added
I've attached a small patch that adds the locked members to the assignee and author values. I think it's the expected behaviour from two reasons:
- there are a lot of cases when you want to find tickets created/assigned to a locked member, especially when a user left the company and you want to find his issues.
- the members page includes the locked members (#22034).
The patch fixes also #24568.
Updated by Mischa The Evil over 7 years ago
- Target version set to Candidate for next major release
I agree with Marius' rationale for the change. I think this would be good improvement.
Updated by Toshi MARUYAMA over 7 years ago
- Related to Feature #24568: Show locked users in 'Users' filter for 'Spent time' report added
Updated by Marius BĂLTEANU over 7 years ago
Let's try fixing this behavior in 3.4.1 or version:3.5.0.
Updated by Mischa The Evil over 7 years ago
Marius BALTEANU wrote:
Let's try fixing this behavior in 3.4.1 or version:3.5.0.
I would support integration of this change into 3.5.0 if we also add a distinction between the locked users and the active users using a HTML optgroup.
I know several situations where the amount of locked users if way bigger than the number of active users. In these situations, application of the current proposed patch would make the author and assigned_to filters pretty hard to work with. WDYT?
Updated by Marius BĂLTEANU over 7 years ago
Totally agree, I'll update the patch in order to group the assignee by status.
Updated by Marius BĂLTEANU about 7 years ago
- File group_by_status.png group_by_status.png added
- File author_by_status.png author_by_status.png added
Mischa, something like that it is good enough?
Also, I think that the Author filter should have the same behaviour:
Updated by Marius BĂLTEANU about 7 years ago
- File 15201_include_locked_members_in_assignee_users_v2.patch 15201_include_locked_members_in_assignee_users_v2.patch added
- Issue assignee
- Issue author
- TimeEntry user
Updated by Mischa The Evil about 7 years ago
Marius BALTEANU wrote:
Mischa, something like that it is good enough?
Looking at the screenshots and after a quick scan of the patch content (with the tests) I'd say: LGTM!
Updated by Toshi MARUYAMA about 7 years ago
- Target version changed from Candidate for next major release to 4.1.0
Updated by Christian Slam almost 7 years ago
Is there a permission to set, that all users can see the locked users in filters? atm only redmine admins can see them.
Updated by Marius BĂLTEANU almost 7 years ago
Christian Slam wrote:
Is there a permission to set, that all users can see the locked users in filters? atm only redmine admins can see them.
No, you can't see (yet) the locked users in filters regardless your user type or permissions. This feature is proposed for the next major Redmine version.
If you need the feature early, you can try apply the patch on your instance, but you need some technical skills to do that. If you need help, please use forums.
Updated by Go MAEDA over 6 years ago
- Status changed from New to Closed
- Assignee set to Go MAEDA
- Priority changed from Low to Normal
- Target version changed from 4.1.0 to 4.0.0
- Resolution set to Fixed
Committed. Thank you for improving Redmine.
Updated by ryou soda almost 6 years ago
- File without_sysadmin.png without_sysadmin.png added
- File with_sysadmin.png with_sysadmin.png added
The system administrator only includes locked users in the assignee filter, is this the expected behavior?
●Not a system administrator
●System administrator
Updated by Sebastian Paluch over 2 years ago
This implementation does not meet its purpose. In 4.1.1 only system administrator can see locked users on the list. Project members are not able to see locker users. This feature should be reopen.
Updated by Mischa The Evil 12 months ago
- Related to Defect #39232: Locked users in filters only visible to administrators added
Updated by Han Boetes 11 months ago
Since we ran into the same problem, I wrote this script to find tickets owned by locked users, which runs from a cronjob and sends an email to somewhere. I hope this might be useful.
#!/bin/sh
disabled_users=$(echo 'select id from users where status = 3;' | mysql -N redmine)
for du in $disabled_users; do echo "select project_id, id, assigned_to_id from issues where assigned_to_id = $du and ( status_id = 1 or status_id = 2 or status_id = 4 or status_id = 14 or status_id = 28 or status_id = 38 );" | mysql -N redmine; done | \
while read project id user; do
# First check if the project is still active.
PS=$(echo "select status from projects where id = $project" | mysql -N redmine)
if [ "$PS" = 5 ]; then
continue
fi
PN=$(echo "select name from projects where id = $project" | mysql -N redmine)
user=$(echo "select login from users where id = $user" | mysql -N redmine)
echo "Ticket $id in project '$PN' is assigned to '$user'"
done
# ./opentickets_formeremployees Ticket 34352 in project 'Konstruktionslaufzettel (Pegasus)' is assigned to 'm.foobar' Ticket 34358 in project 'Konstruktionslaufzettel (Pegasus)' is assigned to 'm.foobar'
Updated by Go MAEDA 3 months ago
- Related to Defect #41079: Incorrect sorting of users grouped by status in issue filters for administrators added