Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11291 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
a0158eff96
commit
bf2613a02b
|
@ -350,12 +350,8 @@ class IssueQuery < Query
|
||||||
groups ||= []
|
groups ||= []
|
||||||
|
|
||||||
members_of_groups = groups.inject([]) {|user_ids, group|
|
members_of_groups = groups.inject([]) {|user_ids, group|
|
||||||
if group && group.user_ids.present?
|
user_ids + group.user_ids + [group.id]
|
||||||
user_ids << group.user_ids
|
}.uniq.compact.sort.collect(&:to_s)
|
||||||
user_ids << group.id
|
|
||||||
end
|
|
||||||
user_ids.flatten.uniq.compact
|
|
||||||
}.sort.collect(&:to_s)
|
|
||||||
|
|
||||||
'(' + sql_for_field("assigned_to_id", operator, members_of_groups, Issue.table_name, "assigned_to_id", false) + ')'
|
'(' + sql_for_field("assigned_to_id", operator, members_of_groups, Issue.table_name, "assigned_to_id", false) + ')'
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue