Project

General

Profile

Defect #33169 » 0001-Fix-issues-and-spent-time-CSV-export-does-not-includ.patch

Marius BĂLTEANU, 2020-03-19 23:51

View differences:

app/views/issues/index.html.erb
48 48
    <label><%= radio_button_tag 'c[]', 'all_inline' %> <%= l(:description_all_columns) %></label>
49 49
  </p>
50 50
  <p>
51
    <label><%= check_box_tag 'c[]', 'description', @query.has_column?(:description) %> <%= l(:field_description) %></label>
52
    <label><%= check_box_tag 'c[]', 'last_notes', @query.has_column?(:last_notes) %> <%= l(:label_last_notes) %></label>
51
    <% @query.available_block_columns.each do |column| %>
52
      <label><%= check_box_tag 'c[]', column.name, @query.has_column?(column) %> <%= column.caption %></label>
53
    <% end %>
53 54
  </p>
54 55
  <%= export_csv_encoding_select_tag %>
55 56
  <% if @issue_count > Setting.issues_export_limit.to_i %>
app/views/timelog/index.html.erb
40 40
    <label><%= radio_button_tag 'c[]', '', true %> <%= l(:description_selected_columns) %></label><br />
41 41
    <label><%= radio_button_tag 'c[]', 'all_inline' %> <%= l(:description_all_columns) %></label>
42 42
  </p>
43
  <p>
44
    <% @query.available_block_columns.each do |column| %>
45
      <label><%= check_box_tag 'c[]', column.name, @query.has_column?(:column) %> <%= column.caption %></label>
46
    <% end %>
47
  </p>
43 48
  <%= export_csv_encoding_select_tag %>
44 49
  <p class="buttons">
45 50
    <%= submit_tag l(:button_export), :name => nil, :onclick => "hideModal(this);", :data => { :disable_with => false } %>
test/functional/issues_controller_test.rb
777 777
    assert_select '#csv-export-form input[name=?][value=?]', 'f[]', ''
778 778
  end
779 779

  
780
  def test_index_should_show_block_columns_in_csv_export_form
781
    field = IssueCustomField.
782
              create!(
783
                :name => 'Long text', :field_format => 'text',
784
                :full_width_layout => '1',
785
                :tracker_ids => [1], :is_for_all => true
786
              )
787
    get :index
788

  
789
    assert_response :success
790
    assert_select '#csv-export-form' do
791
      assert_select 'input[value=?]', 'description'
792
      assert_select 'input[value=?]', 'last_notes'
793
      assert_select 'input[value=?]', "cf_#{field.id}"
794
    end
795
  end
796

  
780 797
  def test_index_csv
781 798
    get(:index, :params => {:format => 'csv'})
782 799
    assert_response :success
(1-1/5)