https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292013-10-25T12:22:36ZRedmineRedmine - Feature #15201: Filter "Assignee" should contain locked usershttps://www.redmine.org/issues/15201?journal_id=528032013-10-25T12:22:36ZGurvan Le Dromaguet
<ul></ul><p>I suppose the best would be an option in Redmine settings to allow <del>or not</del> the querying on locked users.</p> Redmine - Feature #15201: Filter "Assignee" should contain locked usershttps://www.redmine.org/issues/15201?journal_id=528212013-10-26T06:38:51ZMischa The Evil
<ul></ul><p>Jan Niggemann (redmine.org team member) wrote:</p>
<blockquote>
<p>Scenario<br />User leaves company -> profile gets locked<br />User still has issues assigned, but it's not possible to set a filter "Assignee=UserWhoLeft"</p>
</blockquote>
<p>Indeed, at least not using the UI. Using some URL mangling (see <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: URL-mangling provides data not reachable through UI (Closed)" href="https://www.redmine.org/issues/4501">#4501</a>, <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Extend watched_by_me-issue filter to include all project-members instead of only <<me>>-substitution (Closed)" href="https://www.redmine.org/issues/8160">#8160</a> and <a class="issue tracker-2 status-1 priority-4 priority-default" title="Feature: Make issue author freetext searchable for redmine.org project members (New)" href="https://www.redmine.org/issues/13443">#13443</a>) you can still create a query using locked users as assignee.</p>
<p><a href="#" onclick="$('#collapse-0ebaa1a2-show, #collapse-0ebaa1a2-hide').toggle(); $('#collapse-0ebaa1a2').fadeToggle(150);; return false;" id="collapse-0ebaa1a2-show" class="icon icon-collapsed collapsible">Working example of formatted URL where user with ID 10 is locked...</a><a href="#" onclick="$('#collapse-0ebaa1a2-show, #collapse-0ebaa1a2-hide').toggle(); $('#collapse-0ebaa1a2').fadeToggle(150);; return false;" id="collapse-0ebaa1a2-hide" class="icon icon-expended collapsible" style="display:none;">Working example of formatted URL where user with ID 10 is locked...</a><div id="collapse-0ebaa1a2" class="collapsed-text" style="display:none;"><pre>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=</pre></div></p>
<p>If it is decided that locked users are getting included in possible filter values, I'd strongly prefer to distinct them clearly (using HTML <code>optgroup</code> or so).</p> Redmine - Feature #15201: Filter "Assignee" should contain locked usershttps://www.redmine.org/issues/15201?journal_id=528222013-10-26T06:46:45ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Tracker</strong> changed from <i>Defect</i> to <i>Feature</i></li></ul> Redmine - Feature #15201: Filter "Assignee" should contain locked usershttps://www.redmine.org/issues/15201?journal_id=536152013-12-05T15:43:22ZToshi MARUYAMA
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/15602">Defect #15602</a>: Can not filter issues with criteria assigned_to equal to an unaffected user who previously worked on the project</i> added</li></ul> Redmine - Feature #15201: Filter "Assignee" should contain locked usershttps://www.redmine.org/issues/15201?journal_id=551732014-03-05T08:17:00ZLuis Serrano Aranda
<ul></ul><p>I think you should add this feature for more filters like autor, and all the filters with a user.</p> Redmine - Feature #15201: Filter "Assignee" should contain locked usershttps://www.redmine.org/issues/15201?journal_id=581142014-08-15T13:56:31ZDeoren Moor
<ul></ul><p>+1</p>
<p>This would really come in handy.</p> Redmine - Feature #15201: Filter "Assignee" should contain locked usershttps://www.redmine.org/issues/15201?journal_id=586432014-09-14T05:23:15ZToshi MARUYAMA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/11069">Feature #11069</a>: Ability to search tasks of Locked Users</i> added</li></ul> Redmine - Feature #15201: Filter "Assignee" should contain locked usershttps://www.redmine.org/issues/15201?journal_id=643842015-06-22T08:49:10ZIsmael Barros²
<ul></ul><p>+1</p> Redmine - Feature #15201: Filter "Assignee" should contain locked usershttps://www.redmine.org/issues/15201?journal_id=704952016-04-22T07:59:53ZChristophe Portier
<ul></ul><p>+1</p> Redmine - Feature #15201: Filter "Assignee" should contain locked usershttps://www.redmine.org/issues/15201?journal_id=706742016-05-02T11:56:26ZHenning Kröger
<ul></ul><p>+1<br />We are missing locked users in the filters for time entries too. I think this is related to this issue, do you agree?</p> Redmine - Feature #15201: Filter "Assignee" should contain locked usershttps://www.redmine.org/issues/15201?journal_id=709392016-05-13T03:47:50ZToshi MARUYAMA
<ul><li><strong>Category</strong> changed from <i>Issues</i> to <i>Issues filter</i></li></ul> Redmine - Feature #15201: Filter "Assignee" should contain locked usershttps://www.redmine.org/issues/15201?journal_id=739672016-10-10T09:00:36ZStephane Lapie
<ul></ul><p>+1</p> Redmine - Feature #15201: Filter "Assignee" should contain locked usershttps://www.redmine.org/issues/15201?journal_id=741012016-10-20T11:50:25ZSonia Zh
<ul></ul><p>+1 <br />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.</p> Redmine - Feature #15201: Filter "Assignee" should contain locked usershttps://www.redmine.org/issues/15201?journal_id=784282017-05-08T12:14:30ZJürgen Depicker
<ul></ul><p>+1 <br />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 :).</p> Redmine - Feature #15201: Filter "Assignee" should contain locked usershttps://www.redmine.org/issues/15201?journal_id=784302017-05-08T12:17:44ZJürgen Depicker
<ul></ul><p>Related to <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Show locked users in 'Users' filter for 'Spent time' report (Closed)" href="https://www.redmine.org/issues/24568">#24568</a>.</p> Redmine - Feature #15201: Filter "Assignee" should contain locked usershttps://www.redmine.org/issues/15201?journal_id=785332017-05-14T06:49:38ZMarius BĂLTEANU
<ul><li><strong>File</strong> <a href="/attachments/18303">15201_include_locked_members_in_assignee_users.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/18303/15201_include_locked_members_in_assignee_users.patch">15201_include_locked_members_in_assignee_users.patch</a> added</li></ul><p>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:<br />- 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. <br />- the members page includes the locked members (<a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Locked users disappear from project settings (Closed)" href="https://www.redmine.org/issues/22034">#22034</a>).</p>
<p>The patch fixes also <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Show locked users in 'Users' filter for 'Spent time' report (Closed)" href="https://www.redmine.org/issues/24568">#24568</a>.</p> Redmine - Feature #15201: Filter "Assignee" should contain locked usershttps://www.redmine.org/issues/15201?journal_id=789352017-06-01T21:07:59ZMischa The Evil
<ul><li><strong>Target version</strong> set to <i>Candidate for next major release</i></li></ul><p>I agree with Marius' rationale for the change. I think this would be good improvement.</p> Redmine - Feature #15201: Filter "Assignee" should contain locked usershttps://www.redmine.org/issues/15201?journal_id=790412017-06-06T17:25:14ZToshi MARUYAMA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/24568">Feature #24568</a>: Show locked users in 'Users' filter for 'Spent time' report</i> added</li></ul> Redmine - Feature #15201: Filter "Assignee" should contain locked usershttps://www.redmine.org/issues/15201?journal_id=796952017-07-03T15:57:38ZMarius BĂLTEANU
<ul></ul><p>Let's try fixing this behavior in <a class="version" href="https://www.redmine.org/versions/130">3.4.1</a> or version:3.5.0.</p> Redmine - Feature #15201: Filter "Assignee" should contain locked usershttps://www.redmine.org/issues/15201?journal_id=797002017-07-03T17:58:29ZMischa The Evil
<ul></ul><p>Marius BALTEANU wrote:</p>
<blockquote>
<p>Let's try fixing this behavior in <a class="version" href="https://www.redmine.org/versions/130">3.4.1</a> or version:3.5.0.</p>
</blockquote>
<p>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.<br />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?</p> Redmine - Feature #15201: Filter "Assignee" should contain locked usershttps://www.redmine.org/issues/15201?journal_id=801232017-07-19T15:02:33ZMarius BĂLTEANU
<ul></ul><p>Totally agree, I'll update the patch in order to group the assignee by status.</p> Redmine - Feature #15201: Filter "Assignee" should contain locked usershttps://www.redmine.org/issues/15201?journal_id=812852017-09-25T21:51:59ZMarius BĂLTEANU
<ul><li><strong>File</strong> <a href="/attachments/19232">group_by_status.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/19232/group_by_status.png">group_by_status.png</a> added</li><li><strong>File</strong> <a href="/attachments/19233">author_by_status.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/19233/author_by_status.png">author_by_status.png</a> added</li></ul><p>Mischa, something like that it is good enough?</p>
<p><img src="https://www.redmine.org/attachments/download/19232/group_by_status.png" alt="" /></p>
<p>Also, I think that the Author filter should have the same behaviour:</p>
<p><img src="https://www.redmine.org/attachments/download/19233/author_by_status.png" alt="" /></p> Redmine - Feature #15201: Filter "Assignee" should contain locked usershttps://www.redmine.org/issues/15201?journal_id=814552017-10-08T17:04:01ZMarius BĂLTEANU
<ul><li><strong>File</strong> <a href="/attachments/19281">15201_include_locked_members_in_assignee_users_v2.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/19281/15201_include_locked_members_in_assignee_users_v2.patch">15201_include_locked_members_in_assignee_users_v2.patch</a> added</li></ul>Updated the patch to group users by status for the following filters:
<ul>
<li>Issue assignee</li>
<li>Issue author</li>
<li>TimeEntry user</li>
</ul> Redmine - Feature #15201: Filter "Assignee" should contain locked usershttps://www.redmine.org/issues/15201?journal_id=814572017-10-08T22:56:16ZMischa The Evil
<ul></ul><p>Marius BALTEANU wrote:</p>
<blockquote>
<p>Mischa, something like that it is good enough?</p>
</blockquote>
<p>Looking at the screenshots and after a quick scan of the patch content (with the tests) I'd say: LGTM!</p> Redmine - Feature #15201: Filter "Assignee" should contain locked usershttps://www.redmine.org/issues/15201?journal_id=817602017-10-25T05:15:58ZToshi MARUYAMA
<ul><li><strong>Target version</strong> changed from <i>Candidate for next major release</i> to <i>4.1.0</i></li></ul> Redmine - Feature #15201: Filter "Assignee" should contain locked usershttps://www.redmine.org/issues/15201?journal_id=834982018-02-08T09:32:31ZChristian Slam
<ul></ul><p>Is there a permission to set, that all users can see the locked users in filters? atm only redmine admins can see them.</p> Redmine - Feature #15201: Filter "Assignee" should contain locked usershttps://www.redmine.org/issues/15201?journal_id=835292018-02-11T18:54:00ZMarius BĂLTEANU
<ul></ul><p>Christian Slam wrote:</p>
<blockquote>
<p>Is there a permission to set, that all users can see the locked users in filters? atm only redmine admins can see them.</p>
</blockquote>
<p>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.</p>
<p>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.</p> Redmine - Feature #15201: Filter "Assignee" should contain locked usershttps://www.redmine.org/issues/15201?journal_id=854922018-06-09T08:07:50ZGo MAEDA
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li><li><strong>Assignee</strong> set to <i>Go MAEDA</i></li><li><strong>Priority</strong> changed from <i>Low</i> to <i>Normal</i></li><li><strong>Target version</strong> changed from <i>4.1.0</i> to <i>4.0.0</i></li><li><strong>Resolution</strong> set to <i>Fixed</i></li></ul><p>Committed. Thank you for improving Redmine.</p> Redmine - Feature #15201: Filter "Assignee" should contain locked usershttps://www.redmine.org/issues/15201?journal_id=885522018-11-27T09:03:44Zryou soda
<ul><li><strong>File</strong> <a href="/attachments/21882">without_sysadmin.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/21882/without_sysadmin.png">without_sysadmin.png</a> added</li><li><strong>File</strong> <a href="/attachments/21883">with_sysadmin.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/21883/with_sysadmin.png">with_sysadmin.png</a> added</li></ul><p>The system administrator only includes locked users in the assignee filter, is this the expected behavior?</p>
<p>●Not a system administrator<br /><img src="https://www.redmine.org/attachments/download/21882/without_sysadmin.png" alt="" /></p>
<p>●System administrator<br /><img src="https://www.redmine.org/attachments/download/21883/with_sysadmin.png" alt="" /></p> Redmine - Feature #15201: Filter "Assignee" should contain locked usershttps://www.redmine.org/issues/15201?journal_id=1069192022-06-13T12:35:02ZSebastian Paluch
<ul></ul><p>This implementation does not meet its purpose. In 4.1.1 only <strong>system</strong> administrator can see locked users on the list. Project members are not able to see locker users. This feature should be reopen.</p> Redmine - Feature #15201: Filter "Assignee" should contain locked usershttps://www.redmine.org/issues/15201?journal_id=1110862023-10-24T07:28:12ZTurnip Zoink
<ul></ul><p>New ticket: <a class="issue tracker-1 status-1 priority-4 priority-default" title="Defect: Locked users in filters only visible to administrators (New)" href="https://www.redmine.org/issues/39232">#39232</a>.</p> Redmine - Feature #15201: Filter "Assignee" should contain locked usershttps://www.redmine.org/issues/15201?journal_id=1117102023-11-30T03:08:31ZMischa The Evil
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-1 priority-4 priority-default" href="/issues/39232">Defect #39232</a>: Locked users in filters only visible to administrators</i> added</li></ul> Redmine - Feature #15201: Filter "Assignee" should contain locked usershttps://www.redmine.org/issues/15201?journal_id=1118692023-12-13T20:30:39ZHan Boetes
<ul></ul><p>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.</p>
<pre><code class="bash syntaxhl"><span class="c">#!/bin/sh</span>
<span class="nv">disabled_users</span><span class="o">=</span><span class="si">$(</span><span class="nb">echo</span> <span class="s1">'select id from users where status = 3;'</span> | mysql <span class="nt">-N</span> redmine<span class="si">)</span>
<span class="k">for </span><span class="nb">du </span><span class="k">in</span> <span class="nv">$disabled_users</span><span class="p">;</span> <span class="k">do </span><span class="nb">echo</span> <span class="s2">"select project_id, id, assigned_to_id from issues where assigned_to_id = </span><span class="nv">$du</span><span class="s2"> and ( status_id = 1 or status_id = 2 or status_id = 4 or status_id = 14 or status_id = 28 or status_id = 38 );"</span> | mysql <span class="nt">-N</span> redmine<span class="p">;</span> <span class="k">done</span> | <span class="se">\</span>
<span class="k">while </span><span class="nb">read </span>project <span class="nb">id </span>user<span class="p">;</span> <span class="k">do</span>
<span class="c"># First check if the project is still active.</span>
<span class="nv">PS</span><span class="o">=</span><span class="si">$(</span><span class="nb">echo</span> <span class="s2">"select status from projects where id = </span><span class="nv">$project</span><span class="s2">"</span> | mysql <span class="nt">-N</span> redmine<span class="si">)</span>
<span class="k">if</span> <span class="o">[</span> <span class="s2">"</span><span class="nv">$PS</span><span class="s2">"</span> <span class="o">=</span> 5 <span class="o">]</span><span class="p">;</span> <span class="k">then
continue
fi
</span><span class="nv">PN</span><span class="o">=</span><span class="si">$(</span><span class="nb">echo</span> <span class="s2">"select name from projects where id = </span><span class="nv">$project</span><span class="s2">"</span> | mysql <span class="nt">-N</span> redmine<span class="si">)</span>
<span class="nv">user</span><span class="o">=</span><span class="si">$(</span><span class="nb">echo</span> <span class="s2">"select login from users where id = </span><span class="nv">$user</span><span class="s2">"</span> | mysql <span class="nt">-N</span> redmine<span class="si">)</span>
<span class="nb">echo</span> <span class="s2">"Ticket </span><span class="nv">$id</span><span class="s2"> in project '</span><span class="nv">$PN</span><span class="s2">' is assigned to '</span><span class="nv">$user</span><span class="s2">'"</span>
<span class="k">done</span>
</code></pre>
<pre>
# ./opentickets_formeremployees
Ticket 34352 in project 'Konstruktionslaufzettel (Pegasus)' is assigned to 'm.foobar'
Ticket 34358 in project 'Konstruktionslaufzettel (Pegasus)' is assigned to 'm.foobar'
</pre>