]> source.dussan.org Git - redmine.git/commitdiff
Merged r15608 (#23206).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 10 Jul 2016 07:45:54 +0000 (07:45 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 10 Jul 2016 07:45:54 +0000 (07:45 +0000)
git-svn-id: http://svn.redmine.org/redmine/branches/3.2-stable@15613 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/helpers/queries_helper.rb
test/functional/issues_controller_test.rb

index 1dec57f861642584838ffeaaf40a9904d8ab85bc..3e45d635eef890d87636d97a6248689a21089153 100644 (file)
@@ -257,6 +257,8 @@ module QueriesHelper
           tags << hidden_field_tag("v[#{field}][]", value, :id => nil)
         end
       end
+    else
+      tags << hidden_field_tag("f[]", "", :id => nil)
     end
     if query.column_names.present?
       query.column_names.each do |name|
index e2b06c87aa7888fe84bf3ee02c2230add85b2612..6a35d69505f8a88d253e18d806de31eeb9717523 100644 (file)
@@ -488,6 +488,9 @@ class IssuesControllerTest < ActionController::TestCase
 
       assert_select 'input[name=?][value=?]', 'sort', 'status'
     end
+
+    get :index, :project_id => 1, :set_filter => "1", :f => []
+    assert_select '#csv-export-form input[name=?][value=?]', 'f[]', ''
   end
 
   def test_index_csv
@@ -507,6 +510,14 @@ class IssuesControllerTest < ActionController::TestCase
     assert_equal 'text/csv; header=present', @response.content_type
   end
 
+  def test_index_csv_without_any_filters
+    @request.session[:user_id] = 1
+    Issue.create!(:project_id => 1, :tracker_id => 1, :status_id => 5, :subject => 'Closed issue', :author_id => 1)
+    get :index, :set_filter => 1, :f => [], :format => 'csv'
+    assert_response :success
+    assert_equal Issue.count, assigns(:issues).count
+  end
+
   def test_index_csv_with_description
     Issue.generate!(:description => 'test_index_csv_with_description')