Project

General

Profile

Actions

Defect #16038

closed

Issue#css_classes corrupts user.groups association cache

Added by Toshi MARUYAMA almost 11 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Code cleanup/refactoring
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

https://github.com/redmine/redmine/pull/27

diff --git a/app/models/issue.rb b/app/models/issue.rb
index debb931..b9a2b20 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -1091,7 +1091,7 @@ def css_classes(user=User.current)
     if user.logged?
       s << ' created-by-me' if author_id == user.id
       s << ' assigned-to-me' if assigned_to_id == user.id
-      s << ' assigned-to-my-group' if user.groups.any? {|g| g.id = assigned_to_id}
+      s << ' assigned-to-my-group' if user.groups.any? {|g| g.id == assigned_to_id}
     end
     s
   end

If user belongs any groups, 'assigned-to-my-group' is set.
It is wrong.


Related issues

Related to Redmine - Defect #12681: Treat group assignments as assigned to meClosedJean-Philippe Lang

Actions
Related to Redmine - Defect #16166: Incorrect data on Issues assigned to me on MyPageClosed

Actions
Is duplicate of Redmine - Patch #16002: Assigned-to-my-group css corrupts user.groups association cacheClosed

Actions
Actions

Also available in: Atom PDF