diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-01-16 21:27:48 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-01-16 21:27:48 +0000 |
commit | 049051103b02efdef64f4119959d95d23d45e392 (patch) | |
tree | cfb967b5c44fdbdb2e5fc5aa328a058128238379 /app/models/query.rb | |
parent | 18066ba8bf68da4b00b7e740e6c67f8d8b1e0093 (diff) | |
download | redmine-049051103b02efdef64f4119959d95d23d45e392.tar.gz redmine-049051103b02efdef64f4119959d95d23d45e392.zip |
On the calendar, the gantt and in the Tracker filter on the issue list, only active trackers of the project (and its sub projects) can be selected.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1071 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/query.rb')
-rw-r--r-- | app/models/query.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/query.rb b/app/models/query.rb index 09dc0d581..3a1b5a19e 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -132,8 +132,11 @@ class Query < ActiveRecord::Base def available_filters return @available_filters if @available_filters + + trackers = project.nil? ? Tracker.find(:all, :order => 'position') : project.rolled_up_trackers + @available_filters = { "status_id" => { :type => :list_status, :order => 1, :values => IssueStatus.find(:all, :order => 'position').collect{|s| [s.name, s.id.to_s] } }, - "tracker_id" => { :type => :list, :order => 2, :values => Tracker.find(:all, :order => 'position').collect{|s| [s.name, s.id.to_s] } }, + "tracker_id" => { :type => :list, :order => 2, :values => trackers.collect{|s| [s.name, s.id.to_s] } }, "priority_id" => { :type => :list, :order => 3, :values => Enumeration.find(:all, :conditions => ['opt=?','IPRI']).collect{|s| [s.name, s.id.to_s] } }, "subject" => { :type => :text, :order => 8 }, "created_on" => { :type => :date_past, :order => 9 }, |