From 278b685bc8014cf6d4f46e96d42a16cfd270e095 Mon Sep 17 00:00:00 2001 From: Marius Balteanu Date: Sun, 12 Nov 2023 11:06:40 +0000 Subject: [PATCH] Merged r22418 from trunk to 5.0-stable (#39534). git-svn-id: https://svn.redmine.org/redmine/branches/5.0-stable@22425 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/export/pdf/issues_pdf_helper.rb | 2 +- test/functional/issues_controller_test.rb | 23 +++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/lib/redmine/export/pdf/issues_pdf_helper.rb b/lib/redmine/export/pdf/issues_pdf_helper.rb index 80c306a0e..0e020790a 100644 --- a/lib/redmine/export/pdf/issues_pdf_helper.rb +++ b/lib/redmine/export/pdf/issues_pdf_helper.rb @@ -339,7 +339,7 @@ module Redmine issue.visible_custom_field_values.detect do |v| v.custom_field_id == column.custom_field.id end - is_html = cv.custom_field.full_text_formatting? + is_html = cv.custom_field.full_text_formatting? if cv text = show_value(cv, is_html) else text = pdf_format_text issue, column.name.to_sym diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 16d8360a1..e206dd476 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -1182,6 +1182,29 @@ class IssuesControllerTest < Redmine::ControllerTest assert_equal 'application/pdf', @response.media_type end + def test_index_pdf_with_query_grouped_by_full_width_text_custom_field + field = IssueCustomField. + create!( + :name => 'Long text', :field_format => 'text', + :full_width_layout => '1', + :tracker_ids => [1,3], :is_for_all => true + ) + issue = Issue.find(1) + issue.custom_field_values = {field.id => 'This is a long text'} + issue.save! + + get( + :index, + :params => { + :set_filter => 1, + :c => ['subject', 'description', "cf_#{field.id}"], + :format => 'pdf' + } + ) + assert_response :success + assert_equal 'application/pdf', @response.media_type + end + def test_index_atom get( :index, -- 2.39.5