Commit a09b7719 authored by maeda's avatar maeda

Wrong columns after CSV export (#26785).

Patch by Mizuki ISHIKAWA.


git-svn-id: https://svn.redmine.org/redmine/trunk@17686 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 7ce6a9e0
......@@ -40,7 +40,8 @@ class IssuesController < ApplicationController
helper :timelog
def index
retrieve_query
use_session = !request.format.csv?
retrieve_query(IssueQuery, use_session)
if @query.valid?
respond_to do |format|
......
......@@ -803,6 +803,25 @@ class IssuesControllerTest < Redmine::ControllerTest
end
end
def test_index_csv_should_not_change_selected_columns
get :index, :params => {
:set_filter => 1,
:c => ["subject", "due_date"],
:project_id => "ecookbook"
}
assert_response :success
assert_equal [:subject, :due_date], session[:issue_query][:column_names]
get :index, :params => {
:set_filter => 1,
:c =>["all_inline"],
:project_id => "ecookbook",
:format => 'csv'
}
assert_response :success
assert_equal [:subject, :due_date], session[:issue_query][:column_names]
end
def test_index_pdf
["en", "zh", "zh-TW", "ja", "ko"].each do |lang|
with_settings :default_language => lang do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment