diff --git a/lib/redmine/helpers/time_report.rb b/lib/redmine/helpers/time_report.rb index d573b46f8..0681af351 100644 --- a/lib/redmine/helpers/time_report.rb +++ b/lib/redmine/helpers/time_report.rb @@ -112,6 +112,9 @@ module Redmine @available_criteria = { 'project' => {:sql => "#{TimeEntry.table_name}.project_id", :klass => Project, :label => :label_project}, + 'status' => {:sql => "#{Issue.table_name}.status_id", + :klass => IssueStatus, + :label => :field_status}, 'version' => {:sql => "#{Issue.table_name}.fixed_version_id", :klass => Version, :label => :label_version}, diff --git a/test/functional/time_entry_reports_controller_test.rb b/test/functional/time_entry_reports_controller_test.rb index c9256145a..e4ea8b8ec 100644 --- a/test/functional/time_entry_reports_controller_test.rb +++ b/test/functional/time_entry_reports_controller_test.rb @@ -124,6 +124,14 @@ class TimeEntryReportsControllerTest < ActionController::TestCase assert_equal "0.00", "%.2f" % assigns(:report).total_hours end + def test_report_status_criterion + get :report, :project_id => 1, :criteria => ['status'] + assert_response :success + assert_template 'report' + assert_tag :tag => 'th', :content => 'Status' + assert_tag :tag => 'td', :content => 'New' + end + def test_report_all_projects_csv_export get :report, :columns => 'month', :from => "2007-01-01", :to => "2007-06-30", :criteria => ["project", "member", "activity"], :format => "csv"