summaryrefslogtreecommitdiffstats
path: root/lib/redmine/export
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2017-03-09 20:01:01 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2017-03-09 20:01:01 +0000
commitb714c714024796d3cd3bd215b07b4d8798a35406 (patch)
treecf80ecad1125c44db2b8510ce93f819aeaf394da /lib/redmine/export
parent364d1aa72746424b87e1a17823612096db7c3ae3 (diff)
downloadredmine-b714c714024796d3cd3bd215b07b4d8798a35406.tar.gz
redmine-b714c714024796d3cd3bd215b07b4d8798a35406.zip
Get the count by group from the query directly.
git-svn-id: http://svn.redmine.org/redmine/trunk@16387 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/export')
-rw-r--r--lib/redmine/export/pdf/issues_pdf_helper.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/redmine/export/pdf/issues_pdf_helper.rb b/lib/redmine/export/pdf/issues_pdf_helper.rb
index cf8a79d3c..c72ff6657 100644
--- a/lib/redmine/export/pdf/issues_pdf_helper.rb
+++ b/lib/redmine/export/pdf/issues_pdf_helper.rb
@@ -299,12 +299,14 @@ module Redmine
totals_by_group = query.totals_by_group
render_table_header(pdf, query, col_width, row_height, table_width)
previous_group = false
+ result_count_by_group = query.result_count_by_group
+
issue_list(issues) do |issue, level|
if query.grouped? &&
(group = query.group_by_column.value(issue)) != previous_group
pdf.SetFontStyle('B',10)
group_label = group.blank? ? 'None' : group.to_s.dup
- group_label << " (#{query.issue_count_by_group[group]})"
+ group_label << " (#{result_count_by_group[group]})"
pdf.bookmark group_label, 0, -1
pdf.RDMCell(table_width, row_height * 2, group_label, 'LR', 1, 'L')
pdf.SetFontStyle('',8)