https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292017-02-27T16:26:16ZRedmineRedmine - Defect #25212: User profile should link to issues assigned to user or his groupshttps://www.redmine.org/issues/25212?journal_id=769672017-02-27T16:26:16ZFelix Schäfer
<ul></ul><p>This adds the group ids to the linked query:</p>
<pre><code class="diff syntaxhl"><span class="gh">diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index 9bb5d6667..14fa080e0 100644
</span><span class="gd">--- a/app/views/users/show.html.erb
</span><span class="gi">+++ b/app/views/users/show.html.erb
</span><span class="p">@@ -26,7 +26,7 @@</span>
<h3><%=l(:label_issue_plural)%></h3>
<ul>
<li><%= link_to l(:label_assigned_issues),
<span class="gd">- issues_path(:set_filter => 1, :assigned_to_id => @user.id, :sort => 'priority:desc,updated_on:desc') %>:
</span><span class="gi">+ issues_path(:set_filter => 1, :assigned_to_id => ([@user.id] + @user.group_ids).join("|"), :sort => 'priority:desc,updated_on:desc') %>:
</span> <%= Issue.visible.open.assigned_to(@user).count %>
<li><%= link_to l(:label_reported_issues),
issues_path(:set_filter => 1, :status_id => '*', :author_id => @user.id) %>:
</code></pre>
<p>A better way would probably be to add the option to also include issues assigned to a user's groups to the issue query, but that's probably a somewhat larger endeavour :-)</p> Redmine - Defect #25212: User profile should link to issues assigned to user or his groupshttps://www.redmine.org/issues/25212?journal_id=789562017-06-02T05:54:11ZMischa The Evil
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/26078">Defect #26078</a>: List of issues per assignee doesn't match in profile</i> added</li></ul> Redmine - Defect #25212: User profile should link to issues assigned to user or his groupshttps://www.redmine.org/issues/25212?journal_id=789592017-06-02T06:10:21ZMischa The Evil
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/8153">Feature #8153</a>: List assigned issues in user profile page</i> added</li></ul> Redmine - Defect #25212: User profile should link to issues assigned to user or his groupshttps://www.redmine.org/issues/25212?journal_id=789612017-06-02T06:12:26ZMischa The Evil
<ul><li><strong>Category</strong> set to <i>Issues filter</i></li><li><strong>Status</strong> changed from <i>New</i> to <i>Confirmed</i></li><li><strong>Target version</strong> set to <i>3.2.7</i></li><li><strong>Affected version</strong> changed from <i>3.3.2</i> to <i>3.2.0</i></li></ul><p>Confirmed through <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: List of issues per assignee doesn't match in profile (Closed)" href="https://www.redmine.org/issues/26078">#26078</a>:</p>
<blockquote>
<p>I wrote:</p>
<blockquote>
Confirmed on <a class="source" href="https://www.redmine.org/projects/redmine/repository/svn/revisions/16580/entry/trunk">source:/trunk@16580</a>. The root cause of the issue seems to be <a class="issue tracker-1 status-1 priority-4 priority-default" title="Defect: Issue Filtering 'Assignee = <<me>>' shows group issues, but 'Assignee = Bob' does not (New)" href="https://www.redmine.org/issues/13758">#13758</a> (user groups are ignored when filtering on assigned_to equals user). I see two options:
<ol>
<li>fix <a class="issue tracker-1 status-1 priority-4 priority-default" title="Defect: Issue Filtering 'Assignee = <<me>>' shows group issues, but 'Assignee = Bob' does not (New)" href="https://www.redmine.org/issues/13758">#13758</a> by also taking into account the user's groups when filtering on assigned_to equals user;</li>
<li>workaround <a class="issue tracker-1 status-1 priority-4 priority-default" title="Defect: Issue Filtering 'Assignee = <<me>>' shows group issues, but 'Assignee = Bob' does not (New)" href="https://www.redmine.org/issues/13758">#13758</a> by changing the used filter (<a class="source" href="https://www.redmine.org/projects/redmine/repository/svn/revisions/16580/entry/trunk/app/views/users/show.html.erb#L29">source:/trunk/app/views/users/show.html.erb@16580#L29</a>) to also include the user's groups instead of just the user (multiple filter values).</li>
</ol>
</blockquote></blockquote>
<p>Thanks for reporting and providing a patch for this. I can confirm that the patch solves the discrepancy.</p>
<p>Felix Schäfer wrote:</p>
<blockquote>
<p>[...]<br />A better way would probably be to add the option to also include issues assigned to a user's groups to the issue query, but that's probably a somewhat larger endeavour :-)</p>
</blockquote>
<p>I agree. But I too think that your proposed fix suffices for the time being (ie. until <a class="issue tracker-1 status-1 priority-4 priority-default" title="Defect: Issue Filtering 'Assignee = <<me>>' shows group issues, but 'Assignee = Bob' does not (New)" href="https://www.redmine.org/issues/13758">#13758</a> gets implemented). I'll target this issue for inclusion into 3.2.7.</p> Redmine - Defect #25212: User profile should link to issues assigned to user or his groupshttps://www.redmine.org/issues/25212?journal_id=789622017-06-02T06:14:46ZMischa The Evil
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-1 priority-4 priority-default" href="/issues/13758">Defect #13758</a>: Issue Filtering 'Assignee = <<me>>' shows group issues, but 'Assignee = Bob' does not</i> added</li></ul> Redmine - Defect #25212: User profile should link to issues assigned to user or his groupshttps://www.redmine.org/issues/25212?journal_id=790512017-06-06T22:01:23ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Subject</strong> changed from <i>Discrepancy between assigned to count and linked query on user profile page</i> to <i>User profile should link to issues assigned to user or his groups</i></li><li><strong>Status</strong> changed from <i>Confirmed</i> to <i>Resolved</i></li><li><strong>Assignee</strong> set to <i>Jean-Philippe Lang</i></li><li><strong>Resolution</strong> set to <i>Fixed</i></li></ul><p>Patch committed, thanks.</p> Redmine - Defect #25212: User profile should link to issues assigned to user or his groupshttps://www.redmine.org/issues/25212?journal_id=790732017-06-07T19:36:51ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Closed</i></li></ul>