app/helpers/queries_helper.rb | 2 ++ app/helpers/timelog_helper.rb | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/helpers/queries_helper.rb b/app/helpers/queries_helper.rb index a76ae9573..1fc5e049f 100644 --- a/app/helpers/queries_helper.rb +++ b/app/helpers/queries_helper.rb @@ -296,6 +296,8 @@ module QueriesHelper case column.name when :attachments value.to_a.map {|a| a.filename}.join("\n") + when :hours, :estimated_hours, :total_estimated_hours, :spent_hours, :total_spent_hours + format_hours(value) else format_object(value, false) do |value| case value.class.name diff --git a/app/helpers/timelog_helper.rb b/app/helpers/timelog_helper.rb index 1f54e1899..5e22d6951 100644 --- a/app/helpers/timelog_helper.rb +++ b/app/helpers/timelog_helper.rb @@ -109,9 +109,9 @@ module TimelogHelper report.periods.each do |period| sum = sum_hours(select_hours(report.hours, report.columns, period.to_s)) total += sum - row << (sum > 0 ? sum : '') + row << (sum > 0 ? format_hours(sum) : '') end - row << total + row << format_hours(total) csv << row end end @@ -128,9 +128,9 @@ module TimelogHelper periods.each do |period| sum = sum_hours(select_hours(hours_for_value, columns, period.to_s)) total += sum - row << (sum > 0 ? sum : '') + row << (sum > 0 ? format_hours(sum) : '') end - row << total + row << format_hours(total) csv << row if criteria.length > level + 1 report_criteria_to_csv(csv, available_criteria, columns, criteria, periods, hours_for_value, level + 1)