Adds "Status" to the time report criteria (#9985).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8643 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-01-14 09:51:56 +00:00
parent dc7a0ebcf2
commit a6a627f445
2 changed files with 11 additions and 0 deletions

View File

@ -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},

View File

@ -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"