summaryrefslogtreecommitdiffstats
path: root/app/models/query.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-11-07 09:20:36 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-11-07 09:20:36 +0000
commitd3d7678c7689ed6c90fd6058b16c18fc7130c0cf (patch)
treefb6d5b7457a8f8ca0c67e56b2896f1a5ff086fbb /app/models/query.rb
parent8123006bb3a43c3dd1cab8f849c51b79362c6b3a (diff)
downloadredmine-d3d7678c7689ed6c90fd6058b16c18fc7130c0cf.tar.gz
redmine-d3d7678c7689ed6c90fd6058b16c18fc7130c0cf.zip
Ability to filter issues blocked by any/no open issues (#16621).
Patch by Arthur Andersen. git-svn-id: http://svn.redmine.org/redmine/trunk@14809 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/query.rb')
-rw-r--r--app/models/query.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/models/query.rb b/app/models/query.rb
index ed59c5526..0ba7a8c4b 100644
--- a/app/models/query.rb
+++ b/app/models/query.rb
@@ -203,7 +203,9 @@ class Query < ActiveRecord::Base
"!~" => :label_not_contains,
"=p" => :label_any_issues_in_project,
"=!p" => :label_any_issues_not_in_project,
- "!p" => :label_no_issues_in_project
+ "!p" => :label_no_issues_in_project,
+ "*o" => :label_any_open_issues,
+ "!o" => :label_no_open_issues
}
class_attribute :operators_by_filter_type
@@ -218,7 +220,7 @@ class Query < ActiveRecord::Base
:text => [ "~", "!~", "!*", "*" ],
:integer => [ "=", ">=", "<=", "><", "!*", "*" ],
:float => [ "=", ">=", "<=", "><", "!*", "*" ],
- :relation => ["=", "=p", "=!p", "!p", "!*", "*"],
+ :relation => ["=", "=p", "=!p", "!p", "*o", "!o", "!*", "*"],
:tree => ["=", "~", "!*", "*"]
}
@@ -281,7 +283,7 @@ class Query < ActiveRecord::Base
# filter requires one or more values
(values_for(field) and !values_for(field).first.blank?) or
# filter doesn't require any value
- ["o", "c", "!*", "*", "t", "ld", "w", "lw", "l2w", "m", "lm", "y"].include? operator_for(field)
+ ["o", "c", "!*", "*", "t", "ld", "w", "lw", "l2w", "m", "lm", "y", "*o", "!o"].include? operator_for(field)
end if filters
end