[#827] Add status group in time entries report.
Patch provided by Jérôme BATAILLE. Test from Jean-Philippe Lang.
This commit is contained in:
parent
d9a0ac37eb
commit
61a65d4624
|
@ -160,6 +160,9 @@ class TimeEntryReportsController < ApplicationController
|
|||
@available_criterias = { '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},
|
||||
|
|
|
@ -128,6 +128,14 @@ class TimeEntryReportsControllerTest < ActionController::TestCase
|
|||
assert_equal "0.00", "%.2f" % assigns(:total_hours)
|
||||
end
|
||||
|
||||
def test_report_status_criterion
|
||||
get :report, :project_id => 1, :criterias => ['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", :criterias => ["project", "member", "activity"], :format => "csv"
|
||||
assert_response :success
|
||||
|
|
Loading…
Reference in New Issue