From c7806ccbdf883a436496b23696c3a385f641235f Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Wed, 1 Apr 2020 16:20:10 +0000 Subject: [PATCH] Fix issues and spent time CSV export does not include custom fields with "Full width layout" enabled (#33169). Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@19632 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/issues/index.html.erb | 5 +++-- app/views/timelog/index.html.erb | 5 +++++ test/functional/issues_controller_test.rb | 17 +++++++++++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb index fccf118c9..c4719569d 100644 --- a/app/views/issues/index.html.erb +++ b/app/views/issues/index.html.erb @@ -48,8 +48,9 @@

- - + <% @query.available_block_columns.each do |column| %> + + <% end %>

<%= export_csv_encoding_select_tag %> <% if @issue_count > Setting.issues_export_limit.to_i %> diff --git a/app/views/timelog/index.html.erb b/app/views/timelog/index.html.erb index b9afc7475..f60b51064 100644 --- a/app/views/timelog/index.html.erb +++ b/app/views/timelog/index.html.erb @@ -40,6 +40,11 @@

+

+ <% @query.available_block_columns.each do |column| %> + + <% end %> +

<%= export_csv_encoding_select_tag %>

<%= submit_tag l(:button_export), :name => nil, :onclick => "hideModal(this);", :data => { :disable_with => false } %> diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index cb8a6703b..e27b3fdc9 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -777,6 +777,23 @@ class IssuesControllerTest < Redmine::ControllerTest assert_select '#csv-export-form input[name=?][value=?]', 'f[]', '' end + def test_index_should_show_block_columns_in_csv_export_form + field = IssueCustomField. + create!( + :name => 'Long text', :field_format => 'text', + :full_width_layout => '1', + :tracker_ids => [1], :is_for_all => true + ) + get :index + + assert_response :success + assert_select '#csv-export-form' do + assert_select 'input[value=?]', 'description' + assert_select 'input[value=?]', 'last_notes' + assert_select 'input[value=?]', "cf_#{field.id}" + end + end + def test_index_csv get(:index, :params => {:format => 'csv'}) assert_response :success -- 2.39.5