summaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-11-07 09:28:28 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-11-07 09:28:28 +0000
commit495be400a181fdbf275f0a92e52acf54d91d8136 (patch)
treec58776c97ccfce44ebe19e37ed18c02a1a9a5609 /app/models
parent467a69f2b878d7ed56e63b432b4b4ef5ebb4d25f (diff)
downloadredmine-495be400a181fdbf275f0a92e52acf54d91d8136.tar.gz
redmine-495be400a181fdbf275f0a92e52acf54d91d8136.zip
Don't omit version/category filters if project has no versions/categories.
This can be used to filter issues in subprojects that have versions or categories. git-svn-id: http://svn.redmine.org/redmine/trunk@14811 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models')
-rw-r--r--app/models/issue_query.rb16
1 files changed, 6 insertions, 10 deletions
diff --git a/app/models/issue_query.rb b/app/models/issue_query.rb
index fdb5e30cf..429201e4f 100644
--- a/app/models/issue_query.rb
+++ b/app/models/issue_query.rb
@@ -199,17 +199,13 @@ class IssueQuery < Query
:type => :list_optional, :values => role_values
) unless role_values.empty?
- if versions.any?
- add_available_filter "fixed_version_id",
- :type => :list_optional,
- :values => versions.sort.collect{|s| ["#{s.project.name} - #{s.name}", s.id.to_s] }
- end
+ add_available_filter "fixed_version_id",
+ :type => :list_optional,
+ :values => versions.sort.collect{|s| ["#{s.project.name} - #{s.name}", s.id.to_s] }
- if categories.any?
- add_available_filter "category_id",
- :type => :list_optional,
- :values => categories.collect{|s| [s.name, s.id.to_s] }
- end
+ add_available_filter "category_id",
+ :type => :list_optional,
+ :values => categories.collect{|s| [s.name, s.id.to_s] }
add_available_filter "subject", :type => :text
add_available_filter "description", :type => :text