summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-01-18 18:00:27 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-01-18 18:00:27 +0000
commit320c191f04d84bbf9e1f97a8c93d87719a7a27c6 (patch)
treecb933c42d3e5c95bf31f1fcd9f23483783c0b6c6 /lib
parent0ef9bc039d22f7696186d0f236c1c0f93d6b9bd2 (diff)
downloadredmine-320c191f04d84bbf9e1f97a8c93d87719a7a27c6.tar.gz
redmine-320c191f04d84bbf9e1f97a8c93d87719a7a27c6.zip
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
Diffstat (limited to 'lib')
-rw-r--r--lib/redmine/export/pdf.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/redmine/export/pdf.rb b/lib/redmine/export/pdf.rb
index 5242cb37f..c80880afa 100644
--- a/lib/redmine/export/pdf.rb
+++ b/lib/redmine/export/pdf.rb
@@ -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|