summaryrefslogtreecommitdiffstats
path: root/app/models/issue_query.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-10-21 18:01:11 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-10-21 18:01:11 +0000
commit828e8111cc772111bc156924a985e01221f9e76a (patch)
tree1daa93e7f3e74ff9e92245636917d815c3bf36ec /app/models/issue_query.rb
parent6e7e2ef59b594e3d76305ddb986ce17d63ac1a66 (diff)
downloadredmine-828e8111cc772111bc156924a985e01221f9e76a.tar.gz
redmine-828e8111cc772111bc156924a985e01221f9e76a.zip
Add users to assignee/author filters if they are missing (#3398).
git-svn-id: http://svn.redmine.org/redmine/trunk@14722 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/issue_query.rb')
-rw-r--r--app/models/issue_query.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/issue_query.rb b/app/models/issue_query.rb
index e208b64ad..b167c5d9f 100644
--- a/app/models/issue_query.rb
+++ b/app/models/issue_query.rb
@@ -544,6 +544,11 @@ class IssueQuery < Query
"(#{sql})"
end
+ def find_assigned_to_id_filter_values(values)
+ Principal.visible.where(:id => values).map {|p| [p.name, p.id.to_s]}
+ end
+ alias :find_author_id_filter_values :find_assigned_to_id_filter_values
+
IssueRelation::TYPES.keys.each do |relation_type|
alias_method "sql_for_#{relation_type}_field".to_sym, :sql_for_relations
end