diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2021-09-06 19:19:29 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2021-09-06 19:19:29 +0000 |
commit | 0db3e9a7324acd7aed30ecc46c61e9bbcae6ec36 (patch) | |
tree | b81d4e738f8ebeaf82c03b8615a94be00f433528 /lib | |
parent | 649d69ea268bb16656413edee4a831ab4bb7b23f (diff) | |
download | redmine-0db3e9a7324acd7aed30ecc46c61e9bbcae6ec36.tar.gz redmine-0db3e9a7324acd7aed30ecc46c61e9bbcae6ec36.zip |
Expand macros in full-width custom fields when exporting issue to PDF (#35683).
Patch by Jens Krämer.
git-svn-id: http://svn.redmine.org/redmine/trunk@21211 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r-- | lib/redmine/export/pdf/issues_pdf_helper.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/redmine/export/pdf/issues_pdf_helper.rb b/lib/redmine/export/pdf/issues_pdf_helper.rb index 67fbf1cfa..98c7347ab 100644 --- a/lib/redmine/export/pdf/issues_pdf_helper.rb +++ b/lib/redmine/export/pdf/issues_pdf_helper.rb @@ -134,13 +134,18 @@ module Redmine custom_field_values = issue.visible_custom_field_values.select {|value| value.custom_field.full_width_layout?} custom_field_values.each do |value| - text = show_value(value, false) + is_html = value.custom_field.full_text_formatting? + text = show_value(value, is_html) next if text.blank? pdf.SetFontStyle('B', 9) pdf.RDMCell(35+155, 5, value.custom_field.name, "LRT", 1) pdf.SetFontStyle('', 9) - pdf.RDMwriteHTMLCell(35+155, 5, '', '', text, issue.attachments, "LRB") + if is_html + pdf.RDMwriteFormattedCell(35+155, 5, '', '', text, issue.attachments, "LRB") + else + pdf.RDMwriteHTMLCell(35+155, 5, '', '', text, issue.attachments, "LRB") + end end unless issue.leaf? |