summaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/issue_status.rb1
-rw-r--r--app/models/query.rb2
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 },