Bug 17590

Summary: Exporting reports as CSV with 'delimiter' SysPref set to 'tabulation' creates files with 't' as separator
Product: Koha Reporter: Nick Clemens <nick>
Component: ReportsAssignee: Nick Clemens <nick>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: jonathan.druart, julian.maurice, kyle, m.de.rooy, mtj
Version: master   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27045
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28327
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 17590 - Exporting reports as CSV with 'delimiter' SysPref set to 'tabulation' creates files with 't' as separator
[SIGNED-OFF] Bug 17590 - Exporting reports as CSV with 'delimiter' SysPref set to 'tabulation' creates files with 't' as separator
Bug 17590 - Exporting reports as CSV with 'delimiter' SysPref set to 'tabulation' creates files with 't' as separator

Description Nick Clemens 2016-11-08 17:28:55 UTC
We need to translate 'tabulation' to "\t" before creating our file with Text::CSV
Comment 1 Nick Clemens 2016-11-08 17:31:35 UTC
Created attachment 57342 [details] [review]
Bug 17590 - Exporting reports as CSV with 'delimiter' SysPref set to 'tabulation' creates files with 't' as separator

To test:
Set 'delimiter' system preference to 'tabs'
Export a report as csv
Open the file in text editor and note fields separated by character 't'
Apply patch
Export report as CSV
Open file in text editor and note tabs are used to separate fields
Comment 2 Bernardo Gonzalez Kriegel 2016-11-09 22:28:21 UTC
Created attachment 57407 [details] [review]
[SIGNED-OFF] Bug 17590 - Exporting reports as CSV with 'delimiter' SysPref set to 'tabulation' creates files with 't' as separator

To test:
Set 'delimiter' system preference to 'tabs'
Export a report as csv
Open the file in text editor and note fields separated by character 't'
Apply patch
Export report as CSV
Open file in text editor and note tabs are used to separate fields

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
tabs now, no errors.
Comment 3 Marcel de Rooy 2016-11-11 08:00:13 UTC
Hm I cannot recreate your problem.
Your test plan "Export your report" is far from clear.
Do I need to set some preferences to get this Export option?
Comment 4 Jonathan Druart 2016-11-18 09:59:16 UTC
Created attachment 57625 [details] [review]
Bug 17590 - Exporting reports as CSV with 'delimiter' SysPref set to 'tabulation' creates files with 't' as separator

To test:
Set 'delimiter' system preference to 'tabs'
Export a report as csv
Open the file in text editor and note fields separated by character 't'
Apply patch
Export report as CSV
Open file in text editor and note tabs are used to separate fields

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
tabs now, no errors.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 5 Jonathan Druart 2016-11-18 10:00:30 UTC
(In reply to Marcel de Rooy from comment #3)
> Hm I cannot recreate your problem.
> Your test plan "Export your report" is far from clear.
> Do I need to set some preferences to get this Export option?

It's the "Download" link on /reports/guided_reports.pl?reports=1&phase=Run%20this%20report
Comment 6 Jonathan Druart 2016-11-18 10:01:04 UTC
Note that it would make sense to remove the "tab separated text" entry if the pref is set to tabulation.
Comment 7 Kyle M Hall 2016-11-18 14:14:57 UTC
Pushed to master for 16.11, thanks Nick!
Comment 8 Julian Maurice 2016-11-30 13:33:06 UTC
Pushed to 3.22.x, will be in 3.22.13
Comment 9 Mason James 2016-12-14 12:14:48 UTC
Pushed to 16.05.x, for 16.05.06 release