diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-01-31 19:53:24 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-01-31 19:53:24 +0000 |
commit | fe22797d69273cc68b5d070416223e9c5f52f396 (patch) | |
tree | ae81cb18985a8693dbee64800756921212b037e2 /app/models | |
parent | d29ba0b80fac3600b3bde5adc20b4df5c2a9bb37 (diff) | |
download | redmine-fe22797d69273cc68b5d070416223e9c5f52f396.tar.gz redmine-fe22797d69273cc68b5d070416223e9c5f52f396.zip |
added the ability to set the sort order for issue statuses
git-svn-id: http://redmine.rubyforge.org/svn/trunk@205 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/issue_status.rb | 1 | ||||
-rw-r--r-- | app/models/query.rb | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/app/models/issue_status.rb b/app/models/issue_status.rb index aafafec19..1a690b449 100644 --- a/app/models/issue_status.rb +++ b/app/models/issue_status.rb @@ -18,6 +18,7 @@ class IssueStatus < ActiveRecord::Base
before_destroy :check_integrity
has_many :workflows, :foreign_key => "old_status_id"
+ acts_as_list
validates_presence_of :name
validates_uniqueness_of :name
diff --git a/app/models/query.rb b/app/models/query.rb index dbde65a15..5594e5cb6 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -69,7 +69,7 @@ class Query < ActiveRecord::Base def available_filters return @available_filters if @available_filters - @available_filters = { "status_id" => { :type => :list_status, :order => 1, :values => IssueStatus.find(:all).collect{|s| [s.name, s.id.to_s] } }, + @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).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 }, |