Project

General

Profile

Actions

Feature #15201

closed

Filter "Assignee" should contain locked users

Added by Jan Niggemann (redmine.org team member) over 10 years ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Issues filter
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

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

Related to Redmine - Feature #11069: Ability to search tasks of Locked UsersClosed

Actions
Related to Redmine - Feature #24568: Show locked users in 'Users' filter for 'Spent time' reportClosed

Actions
Related to Redmine - Defect #39232: Locked users in filters only visible to administratorsNew

Actions
Has duplicate Redmine - Defect #15602: Can not filter issues with criteria assigned_to equal to an unaffected user who previously worked on the projectClosed

Actions
Actions #1

Updated by Gurvan Le Dromaguet over 10 years ago

I suppose the best would be an option in Redmine settings to allow or not the querying on locked users.

Actions #2

Updated by Mischa The Evil over 10 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...

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).

Actions #3

Updated by Jean-Philippe Lang over 10 years ago

  • Tracker changed from Defect to Feature
Actions #4

Updated by Toshi MARUYAMA over 10 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
Actions #5

Updated by Luis Serrano Aranda about 10 years ago

I think you should add this feature for more filters like autor, and all the filters with a user.

Actions #6

Updated by Deoren Moor over 9 years ago

+1

This would really come in handy.

Actions #7

Updated by Toshi MARUYAMA over 9 years ago

  • Related to Feature #11069: Ability to search tasks of Locked Users added
Actions #8

Updated by Ismael Barros² almost 9 years ago

+1

Actions #9

Updated by Christophe Portier almost 8 years ago

+1

Actions #10

Updated by Henning Kröger almost 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?

Actions #11

Updated by Toshi MARUYAMA almost 8 years ago

  • Category changed from Issues to Issues filter
Actions #12

Updated by Stephane Lapie over 7 years ago

+1

Actions #13

Updated by Sonia Zh over 7 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.

Actions #14

Updated by Jürgen Depicker almost 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 :).

Actions #15

Updated by Jürgen Depicker almost 7 years ago

Related to #24568.

Actions #16

Updated by Marius BĂLTEANU almost 7 years ago

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.

Actions #17

Updated by Mischa The Evil almost 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.

Actions #18

Updated by Toshi MARUYAMA almost 7 years ago

  • Related to Feature #24568: Show locked users in 'Users' filter for 'Spent time' report added
Actions #19

Updated by Marius BĂLTEANU almost 7 years ago

Let's try fixing this behavior in 3.4.1 or version:3.5.0.

Actions #20

Updated by Mischa The Evil almost 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?

Actions #21

Updated by Marius BĂLTEANU over 6 years ago

Totally agree, I'll update the patch in order to group the assignee by status.

Actions #22

Updated by Marius BĂLTEANU over 6 years ago

Mischa, something like that it is good enough?

Also, I think that the Author filter should have the same behaviour:

Actions #23

Updated by Marius BĂLTEANU over 6 years ago

Updated the patch to group users by status for the following filters:
  • Issue assignee
  • Issue author
  • TimeEntry user
Actions #24

Updated by Mischa The Evil over 6 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!

Actions #25

Updated by Toshi MARUYAMA over 6 years ago

  • Target version changed from Candidate for next major release to 4.1.0
Actions #26

Updated by Christian Slam about 6 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.

Actions #27

Updated by Marius BĂLTEANU about 6 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.

Actions #28

Updated by Go MAEDA almost 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.

Actions #29

Updated by ryou soda over 5 years ago

The system administrator only includes locked users in the assignee filter, is this the expected behavior?

●Not a system administrator

●System administrator

Actions #30

Updated by Sebastian Paluch almost 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.

Actions #31

Updated by Turnip Zoink 6 months ago

New ticket: #39232.

Actions #32

Updated by Mischa The Evil 5 months ago

  • Related to Defect #39232: Locked users in filters only visible to administrators added
Actions #33

Updated by Han Boetes 4 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'
Actions

Also available in: Atom PDF