Project

General

Profile

Actions

Feature #15201

closed

Filter "Assignee" should contain locked users

Feature #15201: Filter "Assignee" should contain locked users

Added by Jan Niggemann (redmine.org team member) about 13 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Issues filter
Target version:
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 5 (1 open — 4 closed)

Related to Redmine - Feature #11069: Ability to search tasks of Locked UsersClosedActions
Related to Redmine - Feature #24568: Show locked users in 'Users' filter for 'Spent time' reportClosedActions
Related to Redmine - Defect #39232: Locked users in filters only visible to administratorsNewActions
Related to Redmine - Defect #41079: Incorrect sorting of users grouped by status in issue filters for administratorsClosedGo MAEDAActions
Has duplicate Redmine - Defect #15602: Can not filter issues with criteria assigned_to equal to an unaffected user who previously worked on the projectClosedActions

Updated by Gurvan Le Dromaguet about 13 years ago Actions #1

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 13 years ago Actions #2

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

Updated by Jean-Philippe Lang about 13 years ago Actions #3

  • Tracker changed from Defect to Feature

Updated by Toshi MARUYAMA almost 13 years ago Actions #4

  • 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 12 years ago Actions #5

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

Updated by Deoren Moor over 12 years ago Actions #6

+1

This would really come in handy.

Updated by Toshi MARUYAMA about 12 years ago Actions #7

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

Updated by Ismael Barros² over 11 years ago Actions #8

+1

Updated by Christophe Portier over 10 years ago Actions #9

+1

Updated by Henning Kröger over 10 years ago Actions #10

+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 10 years ago Actions #11

  • Category changed from Issues to Issues filter

Updated by Stephane Lapie about 10 years ago Actions #12

+1

Updated by Sonia Zh about 10 years ago Actions #13

+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 9 years ago Actions #14

+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 Jürgen Depicker over 9 years ago Actions #15

Related to #24568.

Updated by Marius BĂLTEANU over 9 years ago Actions #16

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 9 years ago Actions #17

  • 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 9 years ago Actions #18

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

Updated by Marius BĂLTEANU over 9 years ago Actions #19

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

Updated by Mischa The Evil over 9 years ago Actions #20

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 9 years ago Actions #21

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

Updated by Marius BĂLTEANU about 9 years ago Actions #22

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 9 years ago Actions #23

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

Updated by Mischa The Evil about 9 years ago Actions #24

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 9 years ago Actions #25

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

Updated by Christian Slam almost 9 years ago Actions #26

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 9 years ago Actions #27

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 8 years ago Actions #28

  • 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 8 years ago Actions #29

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 4 years ago Actions #30

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 Delany Middleton about 3 years ago Actions #31

New ticket: #39232.

Updated by Mischa The Evil almost 3 years ago Actions #32

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

Updated by Han Boetes almost 3 years ago Actions #33

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 over 2 years ago Actions #34

  • Related to Defect #41079: Incorrect sorting of users grouped by status in issue filters for administrators added
Actions

Also available in: PDF Atom