def initialize_available_filters
add_available_filter "status_id",
- :type => :list_status, :values => lambda { issue_statuses }
+ :type => :list_status, :values => lambda { issue_statuses_values }
add_available_filter("project_id",
:type => :list, :values => lambda { project_values }
end
# Returns a scope of issue statuses that are available as columns for filters
- def issue_statuses
+ def issue_statuses_values
if project
statuses = project.rolled_up_statuses
else
add_available_filter("issue.tracker_id",
:type => :list,
:name => l("label_attribute_of_issue", :name => l(:field_tracker)),
- :values => lambda { Tracker.sorted.map {|t| [t.name, t.id.to_s]} })
+ :values => lambda { trackers.map {|t| [t.name, t.id.to_s]} })
add_available_filter("issue.status_id",
:type => :list,
:name => l("label_attribute_of_issue", :name => l(:field_status)),
- :values => lambda { IssueStatus.sorted.map {|s| [s.name, s.id.to_s]} })
+ :values => lambda { issue_statuses_values })
add_available_filter("issue.fixed_version_id",
:type => :list,
:name => l("label_attribute_of_issue", :name => l(:field_fixed_version)),