##// END OF EJS Templates
Round totals (#1561)....
Jean-Philippe Lang -
r14262:e35d036bdae5
parent child
Show More
@@ -314,12 +314,12 class IssueQuery < Query
314
314
315 # Returns sum of all the issue's estimated_hours
315 # Returns sum of all the issue's estimated_hours
316 def total_for_estimated_hours
316 def total_for_estimated_hours
317 base_scope.sum(:estimated_hours)
317 base_scope.sum(:estimated_hours).to_f.round(2)
318 end
318 end
319
319
320 # Returns sum of all the issue's time entries hours
320 # Returns sum of all the issue's time entries hours
321 def total_for_spent_hours
321 def total_for_spent_hours
322 base_scope.joins(:time_entries).sum("#{TimeEntry.table_name}.hours")
322 base_scope.joins(:time_entries).sum("#{TimeEntry.table_name}.hours").to_f.round(2)
323 end
323 end
324
324
325 def total_for_custom_field(custom_field)
325 def total_for_custom_field(custom_field)
General Comments 0
You need to be logged in to leave comments. Login now