Defect #13618

CSV export of spent time ignores filters and columns selection

Added by Andrew Dahl over 4 years ago. Updated over 4 years ago.

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

0%

Category:Time tracking
Target version:2.3.1
Resolution:Fixed Affected version:2.3.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)

Removed-CSV-Modal-it-ignores-filters.patch Magnifier (1.3 KB) Andrew Dahl, 2013-07-04 08:03


Related issues

Duplicated by Redmine - Defect #13671: CSV-export of time enteries do not respect the selected c... Closed
Duplicated by Redmine - Defect #13790: CSV Export problem Closed

Associated revisions

Revision 11696
Added by Jean-Philippe Lang over 4 years ago

Fixed that CSV Export of Spent Time ignores filters and columns selection (#13618).

Revision 11745
Added by Jean-Philippe Lang over 4 years ago

Merged r11696 from trunk (#13618).

History

#1 Updated by Etienne Massip over 4 years ago

  • Status changed from New to Confirmed
  • Target version set to 2.3.1

#2 Updated by Jean-Philippe Lang over 4 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.

#3 Updated by Etienne Massip over 4 years ago

Isn't the issue export also concerned as Andrew stated?

Haven't checked in details but it would seem logical.

#4 Updated by Andrew Dahl over 4 years ago

The issue export is not a problem and works as expected, as I noted in the description.

#5 Updated by Etienne Massip over 4 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?

#6 Updated by Andrew Dahl over 4 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!)

#7 Updated by Jean-Philippe Lang over 4 years ago

  • Status changed from Resolved to Closed

Merged.

#8 Updated by Radhakrishna M over 4 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 !!

#9 Updated by Andrew Dahl over 4 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.

#10 Updated by Radhakrishna M over 4 years ago

Andrew Dahl wrote:
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.

Andrew Thank you for your reply..

your solution worked great for me.

many many many Thanks

Also available in: Atom PDF