Defect #22108

Issues filter for CSV Export are not applied

Added by Takayuki Araki almost 2 years ago. Updated almost 2 years ago.

Status:ClosedStart date:
Priority:HighDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Issues filter
Target version:3.2.1
Resolution:Fixed Affected version:3.2.0

Description

When I export CSV file from Issues.
Now the filter for issues, e.g. status, categories are not applied and all opened issues in the project are exported.

I was confirmed that this problem only occurs in version 3.2, not in 3.1.

I found 2 points.

1. CSV export options form doesn't send proper parameter.
\app\views\issues\index.html.erb line 80
form_tag(params.merge({:format => 'csv',:page=>nil}) a form tag with parameters in the action attribute.
But, parameters don't send to the controller.(This has occurred even 2.6.)
And so, IssuesController#index tries to get the filter from session data.

2. Format of session data changed in 3.2
queries_helper.rb line 215

session[:query][:project_id] != (@project ? @project.id : nil)

returns nil in 3.2.

session[:query][:project_id] is nil.
session[:query]["project_id"] has the project_id.

And so, IssuesController#index cannot get the filter from session data.

Environment:
  Redmine version                3.2.0.stable rev.15148
  Ruby version                   2.1.5-p273 (2014-11-13) [i386-mingw32]
  Rails version                  4.2.5.1
  Environment                    production
  Database adapter               Mysql2 (5.6.20 MySQL Community Server (GPL))

Associated revisions

Revision 15202
Added by Jean-Philippe Lang almost 2 years ago

Adds query params as hidden field tags to the CSV export form (#22108).

History

#1 Updated by Toshi MARUYAMA almost 2 years ago

  • Target version set to 3.2.1

#2 Updated by Jean-Philippe Lang almost 2 years ago

  • Subject changed from Issues filter for CSV Export are not applied. to Issues filter for CSV Export are not applied
  • Status changed from New to Resolved
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

Fixed in r15202. Query filters are now added as hidden tags in the CSV export form.

#3 Updated by Jean-Philippe Lang almost 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF