Defect #26785

Wrong columns after CSV export

Added by Vincent Robert over 1 year ago. Updated 15 days ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Issues filter
Target version:3.4.7
Resolution:Fixed Affected version:3.4.2

Description

On the /issues page, if we create a new CSV export with all columns, every columns are selected next time we visit the html page.

Selected columns should remain unchanged after the CSV export.

Capture11.30.02.png (29.9 KB) Vincent Robert, 2017-08-29 11:31

step2.png (31.4 KB) Vincent Robert, 2017-08-29 15:16

step3.png (36.4 KB) Vincent Robert, 2017-08-29 15:16

step1.png (43.1 KB) Vincent Robert, 2017-08-29 15:16

step1bis.png (6.48 KB) Vincent Robert, 2017-08-29 15:25

fix-26785.diff Magnifier - patch (817 Bytes) Go MAEDA, 2018-12-03 06:14

fix-26785-v3.patch Magnifier (1.27 KB) Mizuki ISHIKAWA, 2018-12-03 10:05

Associated revisions

Revision 17686
Added by Go MAEDA 15 days ago

Wrong columns after CSV export (#26785).

Patch by Mizuki ISHIKAWA.

Revision 17687
Added by Go MAEDA 15 days ago

Merged r17686 from trunk to 3.4-stable (#26785).

History

#1 Updated by Go MAEDA over 1 year ago

  • Status changed from New to Needs feedback

I could not reproduce the problem. Could you describe the detailed steps to reproduce?

#2 Updated by Vincent Robert over 1 year ago

Here are the steps to reproduce this bug:

1 - Go to global /issues page

2 - Clear current query

3 - Export all columns to CSV file

4 - Click on Issues link in the menu (or go to /issues page without any parameter in the url)

All columns are now selected!


Here is my configuration:

Environment:
  Redmine version                3.4.2.stable
  Ruby version                   2.3.3-p222 (2016-11-21) [x86_64-darwin16]
  Rails version                  4.2.8
  Environment                    development
  Database adapter               PostgreSQL
SCM:
  Subversion                     1.9.4
  Git                            2.12.1
  Filesystem                     
Redmine plugins:
  no plugin installed

#3 Updated by Go MAEDA over 1 year ago

  • Status changed from Needs feedback to Confirmed

I have confirmed the problem in trunk and 3.4-stable.

#4 Updated by Go MAEDA about 1 year ago

  • Category set to Issues filter

#5 Updated by Go MAEDA 16 days ago

  • File fix-26785.diffMagnifier added
  • Target version set to Candidate for next minor release

You can fix this issue with the attached patch.

My customer experiences ActionDispatch::Cookies::CookieOverflow exception due to this defect. The Redmine has 200+ custom fields. A list of all custom fields is set to session[:issue_query][:column_names] after exporting all columns to CSV and the very long session value causes the exception.

The problem can be addressed by restoring the session value after sending CSV to the client.

#6 Updated by Mizuki ISHIKAWA 16 days ago

  • File fix-26785-v2.patch added

Go MAEDA wrote:

The problem can be addressed by restoring the session value after sending CSV to the client.

The patch attached to #26785#note-5 worked fine for me, but I think it would be better to use the argument use_session of retrieve_query.

I attached a patch of proposed code and test code.

#7 Updated by Mizuki ISHIKAWA 16 days ago

I cleaned up the code a little.

#8 Updated by Go MAEDA 16 days ago

  • File deleted (fix-26785-v2.patch)

#9 Updated by Go MAEDA 16 days ago

  • Target version changed from Candidate for next minor release to 3.4.7

LGTM. Setting the target version to 3.4.7.

#10 Updated by Go MAEDA 15 days ago

  • Status changed from Confirmed to Resolved
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch with a slight change in the test.
Thank you for reporting and fixing the issue.

#11 Updated by Go MAEDA 15 days ago

  • Status changed from Resolved to Closed

Merged to 3.4-stable branch.

Also available in: Atom PDF