プロジェクト

全般

プロフィール

Vote #78277

完了

User profile should link to issues assigned to user or his groups

Admin Redmine さんが4年以上前に追加. 4年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Issues filter_56
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
56
version_id:
128
issue_org_id:
25212
author_id:
3866
assigned_to_id:
1
comments:
7
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
102
ステータス-->[Closed]

説明

On the user profile page, the count of the issues assigned to the user includes issues assigned to groups of the user, whereas the query the link points to does only include issues directly assigned to the user.

The link without groups and count on the user profile page: source:/trunk/app/views/users/show.html.erb@16340#L28
The @Issue.assigned_to@ scope specifically including groups: source:/trunk/app/models/issue.rb@16340#L94

A patch to correct this will follow shortly.


journals

This adds the group ids to the linked query:

<pre><code class="diff">
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) %>:
</code></pre>

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

--------------------------------------------------------------------------------

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

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Patch committed, thanks.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

relates,Closed,8153,List assigned issues in user profile page
relates,New,13758,Issue Filtering 'Assignee = <<me>>' shows group issues, but 'Assignee = Bob' does not
duplicates,Closed,26078,List of issues per assignee doesn't match in profile

Admin Redmine さんが4年以上前に更新

  • カテゴリIssues filter_56 にセット
  • 対象バージョン3.2.7_128 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0