def issue_report
@trackers = @project.trackers
@versions = @project.shared_versions.sort
- @priorities = IssuePriority.all
+ @priorities = IssuePriority.all.reverse
@categories = @project.issue_categories
@assignees = (Setting.issue_group_assignment? ? @project.principals : @project.users).sort
@authors = @project.users.sort
@report_title = l(:field_version)
when "priority"
@field = "priority_id"
- @rows = IssuePriority.all
+ @rows = IssuePriority.all.reverse
@data = Issue.by_priority(@project)
@report_title = l(:field_priority)
when "category"
assert_template 'issue_report'
[:issues_by_tracker, :issues_by_version, :issues_by_category, :issues_by_assigned_to,
- :issues_by_author, :issues_by_subproject].each do |ivar|
+ :issues_by_author, :issues_by_subproject, :issues_by_priority].each do |ivar|
assert_not_nil assigns(ivar)
end
+
+ assert_equal IssuePriority.all.reverse, assigns(:priorities)
end
def test_get_issue_report_details
end
end
+ def test_get_issue_report_details_by_priority
+ get :issue_report_details, :id => 1, :detail => 'priority'
+ assert_equal IssuePriority.all.reverse, assigns(:rows)
+ end
+
def test_get_issue_report_details_with_an_invalid_detail
get :issue_report_details, :id => 1, :detail => 'invalid'