Bug 14013 - Use name of a saved report as part of the file name for download
Summary: Use name of a saved report as part of the file name for download
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Marc Véron
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-19 16:00 UTC by Marc Véron
Modified: 2015-12-03 22:11 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 14013 - Use name of a saved report as part of the file name for download (2.50 KB, patch)
2015-04-19 16:48 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 14013 - Use name of a saved report as part of the file name for download (2.76 KB, patch)
2015-04-19 17:46 UTC, M. Tompsett
Details | Diff | Splinter Review
Bug 14013 - Use name of a saved report as part of the file name for download (2.82 KB, patch)
2015-04-20 10:36 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Véron 2015-04-19 16:00:20 UTC
If you download the results of a saved report Koha proposes a standard filename (reportresults.csv / reportresults.tab / reportresults.ods)

It would be nice to get the name of the saved report as part of the download file name, e.g. 
MyReport-reportresults.csv
OtherReport-reportresults.csv
Comment 1 Marc Véron 2015-04-19 16:48:06 UTC Comment hidden (obsolete)
Comment 2 M. Tompsett 2015-04-19 17:46:32 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2015-04-20 10:36:20 UTC
Created attachment 38173 [details] [review]
Bug 14013 - Use name of a saved report as part of the file name for download

This patch propoeses the name of a saved report as part of the download file name.

To test:

- Apply patch
- Got to Home > Reports > Guided reports wizard > Saved reports (or create a new report from sql)
- Run a saved report
- Download the report (as csv, tab, ods)
Result: The downlaod file name proposed should be prepended by the report name, separated with a -

- Bonus test: Try to downlaod saved reports which have special character in their name.

NOTE: Used "ñ/â is N/A" as a report name. The /'s were translated
      to underscored, but the letters were as expected.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 4 Tomás Cohen Arazi 2015-04-22 18:25:02 UTC
Patch pushed to master.

Thanks Marc!