Fixed: PDF export of a issue list grouped by a custom field raises an error (#4600).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3333 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -144,13 +144,15 @@ module Redmine
|
||||
# rows
|
||||
pdf.SetFontStyle('',8)
|
||||
pdf.SetFillColor(255, 255, 255)
|
||||
group = false
|
||||
previous_group = false
|
||||
issues.each do |issue|
|
||||
if query.grouped? && issue.send(query.group_by) != group
|
||||
group = issue.send(query.group_by)
|
||||
if query.grouped? && (group = query.group_by_column.value(issue)) != previous_group
|
||||
pdf.SetFontStyle('B',9)
|
||||
pdf.Cell(277, row_height, "#{group.blank? ? 'None' : group.to_s}", 1, 1, 'L')
|
||||
pdf.Cell(277, row_height,
|
||||
(group.blank? ? 'None' : group.to_s) + " (#{@issue_count_by_group[group]})",
|
||||
1, 1, 'L')
|
||||
pdf.SetFontStyle('',8)
|
||||
previous_group = group
|
||||
end
|
||||
pdf.Cell(15, row_height, issue.id.to_s, 1, 0, 'L', 1)
|
||||
query.columns.each_with_index do |column, i|
|
||||
|
||||
Reference in New Issue
Block a user