Project

General

Profile

Defect #35726 » #35726.patch

Patch against trunk @ r21131 - Mischa The Evil, 2021-08-09 21:33

View differences:

app/helpers/queries_helper.rb
296 296
    case column.name
297 297
    when :attachments
298 298
      value.to_a.map {|a| a.filename}.join("\n")
299
    when :hours, :estimated_hours, :total_estimated_hours, :spent_hours, :total_spent_hours
300
      format_hours(value)
299 301
    else
300 302
      format_object(value, false) do |value|
301 303
        case value.class.name
app/helpers/timelog_helper.rb
109 109
      report.periods.each do |period|
110 110
        sum = sum_hours(select_hours(report.hours, report.columns, period.to_s))
111 111
        total += sum
112
        row << (sum > 0 ? sum : '')
112
        row << (sum > 0 ? format_hours(sum) : '')
113 113
      end
114
      row << total
114
      row << format_hours(total)
115 115
      csv << row
116 116
    end
117 117
  end
......
128 128
      periods.each do |period|
129 129
        sum = sum_hours(select_hours(hours_for_value, columns, period.to_s))
130 130
        total += sum
131
        row << (sum > 0 ? sum : '')
131
        row << (sum > 0 ? format_hours(sum) : '')
132 132
      end
133
      row << total
133
      row << format_hours(total)
134 134
      csv << row
135 135
      if criteria.length > level + 1
136 136
        report_criteria_to_csv(csv, available_criteria, columns, criteria, periods, hours_for_value, level + 1)
(2-2/2)