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:
parent
dc7a0ebcf2
commit
a6a627f445
@ -112,6 +112,9 @@ module Redmine
|
|||||||
@available_criteria = { 'project' => {:sql => "#{TimeEntry.table_name}.project_id",
|
@available_criteria = { 'project' => {:sql => "#{TimeEntry.table_name}.project_id",
|
||||||
:klass => Project,
|
:klass => Project,
|
||||||
:label => :label_project},
|
:label => :label_project},
|
||||||
|
'status' => {:sql => "#{Issue.table_name}.status_id",
|
||||||
|
:klass => IssueStatus,
|
||||||
|
:label => :field_status},
|
||||||
'version' => {:sql => "#{Issue.table_name}.fixed_version_id",
|
'version' => {:sql => "#{Issue.table_name}.fixed_version_id",
|
||||||
:klass => Version,
|
:klass => Version,
|
||||||
:label => :label_version},
|
:label => :label_version},
|
||||||
|
@ -124,6 +124,14 @@ class TimeEntryReportsControllerTest < ActionController::TestCase
|
|||||||
assert_equal "0.00", "%.2f" % assigns(:report).total_hours
|
assert_equal "0.00", "%.2f" % assigns(:report).total_hours
|
||||||
end
|
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
|
def test_report_all_projects_csv_export
|
||||||
get :report, :columns => 'month', :from => "2007-01-01", :to => "2007-06-30",
|
get :report, :columns => 'month', :from => "2007-01-01", :to => "2007-06-30",
|
||||||
:criteria => ["project", "member", "activity"], :format => "csv"
|
:criteria => ["project", "member", "activity"], :format => "csv"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user