Defect #13618
closedCSV export of spent time ignores filters and columns selection
0%
Description
When you do a CSV export of spent time, it opens a dialog that lets you choose which columns you want to include in that export.
The problem is that the dialog is a form, and the form's action holds all the filter parameters. By design, GET actions in forms
remove all URL parameters upon submission, thus the exported CSV contains all the issues instead of the expected filtered issues.
It looks like exporting of issues to CSV (not to be confused with spent time) works, as the queries are pulled from session data
and don't rely on parameters. I think this would be the best solution for spent time queries, assuming that the ability to choose
which columns you want to export (selected versus all) is important.
The quickest solution would be to remove the modal altogether and always do selected columns only.
(The modal was introduced with #4742)
Files
Related issues
Updated by Etienne Massip over 11 years ago
- Status changed from New to Confirmed
- Target version set to 2.3.1
Updated by Jean-Philippe Lang over 11 years ago
- Subject changed from CSV Export of Spent Time ignores filters to CSV export of spent time ignores filters and columns selection
- Status changed from Confirmed to Resolved
- Assignee set to Jean-Philippe Lang
- Resolution set to Fixed
Fixed in r11696, thanks for pointing this out.
Updated by Etienne Massip over 11 years ago
Isn't the issue export also concerned as Andrew stated?
Haven't checked in details but it would seem logical.
Updated by Andrew Dahl over 11 years ago
The issue export is not a problem and works as expected, as I noted in the description.
Updated by Etienne Massip over 11 years ago
Andrew Dahl wrote:
The issue export is not a problem and works as expected, as I noted in the description.
Thanks to the session storage?
Updated by Andrew Dahl over 11 years ago
Etienne Massip wrote:
Andrew Dahl wrote:
The issue export is not a problem and works as expected, as I noted in the description.
Thanks to the session storage?
That is correct.
Since the URL arguments are dropped off the form's action on submission, the time spent export has no way of knowing what filters and columns were selected. The issue export has query sessions, so it can recreate the query without the passed arguments. At least, that's my understanding from the code I read through.
So, with this patch, everything's working as expected. :-) (Also, thanks for the fix, Jean!)
Updated by Radhakrishna M over 11 years ago
Andrew, can you please provide the code changes ? It would be very very helpful to me.
Because i have been struggling with this issue from almost 6 months !!
Updated by Andrew Dahl over 11 years ago
Radhakrishna, the associated revision is located here: http://www.redmine.org/projects/redmine/repository/revisions/11696
I just removed the Modal, patch attached. I would recommend the associated revision (or upgrading your Redmine version to 2.3.1); however, I haven't tested it.
Updated by Radhakrishna M over 11 years ago
Andrew Dahl wrote:
Radhakrishna, the associated revision is located here: http://www.redmine.org/projects/redmine/repository/revisions/11696I just removed the Modal, patch attached. I would recommend the associated revision (or upgrading your Redmine version to 2.3.1); however, I haven't tested it.
Andrew Thank you for your reply..
your solution worked great for me.
many many many Thanks