Project

General

Profile

Actions

Defect #26785

closed

Wrong columns after CSV export

Added by Vincent Robert over 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Issues filter
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

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.


Files

Capture11.30.02.png (29.9 KB) Capture11.30.02.png Vincent Robert, 2017-08-29 11:31
step2.png (31.4 KB) step2.png Vincent Robert, 2017-08-29 15:16
step3.png (36.4 KB) step3.png Vincent Robert, 2017-08-29 15:16
step1.png (43.1 KB) step1.png Vincent Robert, 2017-08-29 15:16
step1bis.png (6.48 KB) step1bis.png Vincent Robert, 2017-08-29 15:25
fix-26785.diff (817 Bytes) fix-26785.diff patch Go MAEDA, 2018-12-03 06:14
fix-26785-v3.patch (1.27 KB) fix-26785-v3.patch Mizuki ISHIKAWA, 2018-12-03 10:05
Actions #1

Updated by Go MAEDA over 6 years ago

  • Status changed from New to Needs feedback

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

Actions #2

Updated by Vincent Robert over 6 years 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
Actions #3

Updated by Go MAEDA over 6 years ago

  • Status changed from Needs feedback to Confirmed

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

Actions #4

Updated by Go MAEDA over 6 years ago

  • Category set to Issues filter
Actions #5

Updated by Go MAEDA over 5 years ago

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.

Actions #6

Updated by Mizuki ISHIKAWA over 5 years 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.

Actions #7

Updated by Mizuki ISHIKAWA over 5 years ago

I cleaned up the code a little.

Actions #8

Updated by Go MAEDA over 5 years ago

  • File deleted (fix-26785-v2.patch)
Actions #9

Updated by Go MAEDA over 5 years ago

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

LGTM. Setting the target version to 3.4.7.

Actions #10

Updated by Go MAEDA over 5 years 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.

Actions #11

Updated by Go MAEDA over 5 years ago

  • Status changed from Resolved to Closed

Merged to 3.4-stable branch.

Actions

Also available in: Atom PDF