From e35d036bdae514338d4a499bfaaaf21d06def1b7 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 4 Oct 2015 22:16:59 +0000 Subject: [PATCH] Round totals (#1561). git-svn-id: http://svn.redmine.org/redmine/trunk@14644 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue_query.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/issue_query.rb b/app/models/issue_query.rb index 51a4fda23..36f47ef0e 100644 --- a/app/models/issue_query.rb +++ b/app/models/issue_query.rb @@ -314,12 +314,12 @@ class IssueQuery < Query # Returns sum of all the issue's estimated_hours def total_for_estimated_hours - base_scope.sum(:estimated_hours) + base_scope.sum(:estimated_hours).to_f.round(2) end # Returns sum of all the issue's time entries hours def total_for_spent_hours - base_scope.joins(:time_entries).sum("#{TimeEntry.table_name}.hours") + base_scope.joins(:time_entries).sum("#{TimeEntry.table_name}.hours").to_f.round(2) end def total_for_custom_field(custom_field) -- 2.39.5