move setting the format until we filled all rows

git-svn-id: https://dev.finn.de/svn/cockpit/trunk@1068 7926756e-e54e-46e6-9721-ed318f58905e
pull/6827/head
t.felgentreff 15 years ago
parent cad11aa688
commit b5b51a6fc5
  1. 13
      lib/xls_report/issues_controller_patch.rb

@ -40,6 +40,13 @@ module XlsReport
headers = (columns.collect(&:caption) << l(:field_description)).unshift("#")
sb.add_headers(headers)
issues.each do |issue|
sb.add_row((columns.collect do |column|
cv = column.value(issue)
(cv.respond_to? :name) ? cv.name : cv
end << issue.description).unshift(issue.id))
end
headers.each_with_index do |h,idx|
h = h.to_s.downcase
if (h =~ /.*hours.*/ or h == "spent_time")
@ -49,12 +56,6 @@ module XlsReport
end
end
issues.each do |issue|
sb.add_row((columns.collect do |column|
cv = column.value(issue)
(cv.respond_to? :name) ? cv.name : cv
end << issue.description).unshift(issue.id))
end
sb
end

Loading…
Cancel
Save