Browse Source

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
tags/5.0.0
Marius Balteanu 2 years ago
parent
commit
0db3e9a732
1 changed files with 7 additions and 2 deletions
  1. 7
    2
      lib/redmine/export/pdf/issues_pdf_helper.rb

+ 7
- 2
lib/redmine/export/pdf/issues_pdf_helper.rb View File

@@ -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?

Loading…
Cancel
Save