From 91d10c63f02c6116c6215d66fa8ff7b17cddf527 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 5 Mar 2017 07:58:07 +0000 Subject: Show Last Comment in Issue list (#1474). Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@16367 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/export/pdf/issues_pdf_helper.rb | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'lib/redmine') diff --git a/lib/redmine/export/pdf/issues_pdf_helper.rb b/lib/redmine/export/pdf/issues_pdf_helper.rb index 4c0b935da..cf8a79d3c 100644 --- a/lib/redmine/export/pdf/issues_pdf_helper.rb +++ b/lib/redmine/export/pdf/issues_pdf_helper.rb @@ -278,8 +278,8 @@ module Redmine table_width = col_width.inject(0, :+) end - # use full width if the description is displayed - if table_width > 0 && query.has_column?(:description) + # use full width if the description or last_notes are displayed + if table_width > 0 && (query.has_column?(:description) || query.has_column?(:last_notes)) col_width = col_width.map {|w| w * (page_width - right_margin - left_margin) / table_width} table_width = col_width.inject(0, :+) end @@ -339,6 +339,13 @@ module Redmine pdf.RDMwriteHTMLCell(0, 5, 10, '', issue.description.to_s, issue.attachments, "LRBT") pdf.set_auto_page_break(false) end + + if query.has_column?(:last_notes) && issue.last_notes.present? + pdf.set_x(10) + pdf.set_auto_page_break(true, bottom_margin) + pdf.RDMwriteHTMLCell(0, 5, 10, '', issue.last_notes.to_s, [], "LRBT") + pdf.set_auto_page_break(false) + end end if issues.size == Setting.issues_export_limit.to_i -- cgit v1.2.3