summaryrefslogtreecommitdiffstats
path: root/app/models/issue_query.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-07-28 15:29:31 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-07-28 15:29:31 +0000
commit4a70a319c5e6aba1779b18ee31a63f0961846373 (patch)
treee6a75f3ab8d8bf5a634226b4df2bb0d48ef5cb62 /app/models/issue_query.rb
parent76e48c391454ee09628059b3a3675a1db7319988 (diff)
downloadredmine-4a70a319c5e6aba1779b18ee31a63f0961846373.tar.gz
redmine-4a70a319c5e6aba1779b18ee31a63f0961846373.zip
Filtering issues on "related to" may ignore other filters (#14401).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12058 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/issue_query.rb')
-rw-r--r--app/models/issue_query.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/models/issue_query.rb b/app/models/issue_query.rb
index bc2ca7abe..56ef9f08e 100644
--- a/app/models/issue_query.rb
+++ b/app/models/issue_query.rb
@@ -467,10 +467,9 @@ class IssueQuery < Query
if relation_options[:sym] == field && !options[:reverse]
sqls = [sql, sql_for_relations(field, operator, value, :reverse => true)]
- sqls.join(["!", "!*", "!p"].include?(operator) ? " AND " : " OR ")
- else
- sql
+ sql = sqls.join(["!", "!*", "!p"].include?(operator) ? " AND " : " OR ")
end
+ "(#{sql})"
end
IssueRelation::TYPES.keys.each do |relation_type|