Defect #25212
closed
This adds the group ids to the linked query:
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index 9bb5d6667..14fa080e0 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -26,7 +26,7 @@
<h3><%=l(:label_issue_plural)%></h3>
<ul>
<li><%= link_to l(:label_assigned_issues),
- issues_path(:set_filter => 1, :assigned_to_id => @user.id, :sort => 'priority:desc,updated_on:desc') %>:
+ issues_path(:set_filter => 1, :assigned_to_id => ([@user.id] + @user.group_ids).join("|"), :sort => 'priority:desc,updated_on:desc') %>:
<%= 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) %>:
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 :-)
- Has duplicate Defect #26078: List of issues per assignee doesn't match in profile added
- Related to Feature #8153: List assigned issues in user profile page added
- Category set to Issues filter
- Status changed from New to Confirmed
- Target version set to 3.2.7
- Affected version changed from 3.3.2 to 3.2.0
Confirmed through #26078:
I wrote:
Confirmed on source:/trunk@16580. The root cause of the issue seems to be #13758 (user groups are ignored when filtering on assigned_to equals user). I see two options:
- fix #13758 by also taking into account the user's groups when filtering on assigned_to equals user;
- workaround #13758 by changing the used filter (source:/trunk/app/views/users/show.html.erb@16580#L29) to also include the user's groups instead of just the user (multiple filter values).
Thanks for reporting and providing a patch for this. I can confirm that the patch solves the discrepancy.
Felix Schäfer wrote:
[...]
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 :-)
I agree. But I too think that your proposed fix suffices for the time being (ie. until #13758 gets implemented). I'll target this issue for inclusion into 3.2.7.
- Related to Defect #13758: Issue Filtering 'Assignee = <<me>>' shows group issues, but 'Assignee = Bob' does not added
- Subject changed from Discrepancy between assigned to count and linked query on user profile page to User profile should link to issues assigned to user or his groups
- Status changed from Confirmed to Resolved
- Assignee set to Jean-Philippe Lang
- Resolution set to Fixed
- Status changed from Resolved to Closed
Also available in: Atom
PDF