issue_statuses_filter_fix.diff

Applies to 0.9.3 - Bo Hansen, 2010-04-30 11:31

Download (1.34 KB)

View differences:

query.rb 2010-04-30 09:10:09.000000000 +0000
167 167
  def available_filters
168 168
    return @available_filters if @available_filters
169 169
    
170 170
    trackers = project.nil? ? Tracker.find(:all, :order => 'position') : project.rolled_up_trackers
171 171
    
172
    @available_filters = { "status_id" => { :type => :list_status, :order => 1, :values => IssueStatus.find(:all, :order => 'position').collect{|s| [s.name, s.id.to_s] } },       
172
    issue_statuses = trackers.collect{|t| t.issue_statuses}.flatten.uniq.sort
173

  
174
    @available_filters = { "status_id" => { :type => :list_status, :order => 1, :values => issue_statuses.collect{|s| [s.name, s.id.to_s]} },
173 175
                           "tracker_id" => { :type => :list, :order => 2, :values => trackers.collect{|s| [s.name, s.id.to_s] } },                                                                                                                
174 176
                           "priority_id" => { :type => :list, :order => 3, :values => IssuePriority.all.collect{|s| [s.name, s.id.to_s] } },
175 177
                           "subject" => { :type => :text, :order => 8 },  
176 178
                           "created_on" => { :type => :date_past, :order => 9 },                        
177 179
                           "updated_on" => { :type => :date_past, :order => 10 },