Bug 14013

Summary: Use name of a saved report as part of the file name for download
Product: Koha Reporter: Marc Véron <veron>
Component: ReportsAssignee: Marc Véron <veron>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: tomascohen
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10627
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 14013 - Use name of a saved report as part of the file name for download
Bug 14013 - Use name of a saved report as part of the file name for download
Bug 14013 - Use name of a saved report as part of the file name for download

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 Mark 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 (tcohen) 2015-04-22 18:25:02 UTC
Patch pushed to master.

Thanks Marc!