Project

General

Profile

Patch #29830 » 0001-fix-Issue-CSV-export-options-checkboxes-have-no-effe.patch

Tobias Stenzel, 2018-10-22 22:21

View differences:

app/helpers/queries_helper.rb
339 339
  end
340 340

  
341 341
  # Returns the query definition as hidden field tags
342
  def query_as_hidden_field_tags(query)
342
  # columns in ignored_column_names are skipped (names as symbols)
343
  def query_as_hidden_field_tags(query, ignored_column_names = [])
343 344
    tags = hidden_field_tag("set_filter", "1", :id => nil)
344 345

  
345 346
    if query.filters.present?
......
354 355
      tags << hidden_field_tag("f[]", "", :id => nil)
355 356
    end
356 357
    query.columns.each do |column|
358
      next if ignored_column_names.include?(column.name)
359

  
357 360
      tags << hidden_field_tag("c[]", column.name, :id => nil)
358 361
    end
359 362
    if query.totalable_names.present?
app/views/issues/index.html.erb
29 29
<div id="csv-export-options" style="display:none;">
30 30
  <h3 class="title"><%= l(:label_export_options, :export_format => 'CSV') %></h3>
31 31
  <%= form_tag(_project_issues_path(@project, :format => 'csv'), :method => :get, :id => 'csv-export-form') do %>
32
  <%= query_as_hidden_field_tags(@query) %>
32
  <%= query_as_hidden_field_tags(@query, [:description, :last_notes]) %>
33 33
  <p>
34 34
    <label><%= radio_button_tag 'c[]', '', true %> <%= l(:description_selected_columns) %></label><br />
35 35
    <label><%= radio_button_tag 'c[]', 'all_inline' %> <%= l(:description_all_columns) %></label>
(1-1/2)