Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
OHR Support
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
97
Issues
97
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
OHR Support
Commits
61a65d46
Commit
61a65d46
authored
Jan 16, 2012
by
Holger Just
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[#827] Add status group in time entries report.
Patch provided by Jérôme BATAILLE. Test from Jean-Philippe Lang.
parent
d9a0ac37
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
time_entry_reports_controller.rb
app/controllers/time_entry_reports_controller.rb
+3
-0
time_entry_reports_controller_test.rb
test/functional/time_entry_reports_controller_test.rb
+8
-0
No files found.
app/controllers/time_entry_reports_controller.rb
View file @
61a65d46
...
...
@@ -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
},
...
...
test/functional/time_entry_reports_controller_test.rb
View file @
61a65d46
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment