diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2023-11-11 06:41:09 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2023-11-11 06:41:09 +0000 |
commit | 5013c284314ca8c08eef84b481162a9ffb03849a (patch) | |
tree | 233d7103940024b8ec86cc3e9d141c252190ea37 /test/functional/issues_controller_test.rb | |
parent | 98fa89400e5694ae618963f72c2bba5402fd5c4a (diff) | |
download | redmine-5013c284314ca8c08eef84b481162a9ffb03849a.tar.gz redmine-5013c284314ca8c08eef84b481162a9ffb03849a.zip |
Fix undefined method error in issue list PDF export when export contains a custom field block column with full width layout enabled that is not part of the tracker of the exported ticket(s) (#39534).
git-svn-id: https://svn.redmine.org/redmine/trunk@22418 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/issues_controller_test.rb')
-rw-r--r-- | test/functional/issues_controller_test.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index b8580cd15..341a508fa 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -1194,6 +1194,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_pdf_filename_without_query get :index, :params => {:format => 'pdf'} assert_response :success |