Bug 9892

Summary: export_borrowers.pl separator should default to the 'delimiter' syspref value
Product: Koha Reporter: Jared Camins-Esakov <jcamins>
Component: Command-line UtilitiesAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: minor    
Priority: P5 - low CC: bgkriegel, jonathan.druart, m.de.rooy, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on:    
Bug Blocks: 14215    
Attachments: Bug 9892: MAke export_borrowers.pl using the delimiter pref
[SIGNED-OFF] Bug 9892: Make export_borrowers.pl using the delimiter pref
Bug 9892: Make export_borrowers.pl using the delimiter pref
Bug 9892: [QA Follow-up] Typo and updated usage
Bug 9892: Make export_borrowers.pl using the delimiter pref
Bug 9892: [QA Follow-up] Typo and updated usage

Description Jared Camins-Esakov 2013-03-21 14:45:44 UTC
misc/export_borrowers.pl allows the user to specify a separator character, but there is no way to specify a tab.
Comment 1 Katrin Fischer 2013-03-21 21:05:28 UTC
Kyle noted a possibility in his comments on bug 9045:
./export_borrowers.pl -w "borrowernumber > 30" -s $'\t'

This seems to do the trick, but is probably a bit hard to guess. Maybe we should add it to the documentation or provide an easier way in the script?
Comment 2 Jared Camins-Esakov 2013-03-21 22:11:38 UTC
In other scripts we parse \t.
Comment 3 Jonathan Druart 2015-04-09 13:53:40 UTC Comment hidden (obsolete)
Comment 4 Bernardo Gonzalez Kriegel 2015-05-06 17:36:41 UTC Comment hidden (obsolete)
Comment 5 Marcel de Rooy 2015-05-08 07:33:55 UTC Comment hidden (obsolete)
Comment 6 Marcel de Rooy 2015-05-08 07:33:59 UTC Comment hidden (obsolete)
Comment 7 Marcel de Rooy 2015-05-08 07:35:17 UTC
Created attachment 38969 [details] [review]
Bug 9892: Make export_borrowers.pl using the delimiter pref

The original concern of bug 9892 was that this borrowers export script
cannot handle tabulation to separate columns.

With this patch, the delimiter preference is used as separator for the
output, to be consistent with others scripts.

This should be highlighted on the release, it can produce change in
behaviors.

Test plan:
Confirm that the 'delimiter' pref is used for the output, but you are able
to overwrite it with the 'separator' parameter

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as expected, respect preference but is supeseeded by cmd line
No koha-qa errors

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 8 Marcel de Rooy 2015-05-08 07:35:22 UTC
Created attachment 38970 [details] [review]
Bug 9892: [QA Follow-up] Typo and updated usage

Corrected specifield.
Updated usage statement on use of delimiter pref.
Clarified the CONDITION explanation somewhat..

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 9 Marcel de Rooy 2015-05-08 07:39:42 UTC
QA Comment:
The problem in Comment1 has not yet been fully addressed. You can now choose tabulation in the delimiter pref but it is hard to pass a tab via the command line. But it is an improvement imo.

The commit message says: [This should be highlighted on the release, it can produce change in behaviors.]
This only pertains to the situation that someone does not pass a separator parameter and has a delimiter<>comma.
Comment 10 Tomás Cohen Arazi (tcohen) 2015-05-19 12:30:02 UTC
Patches pushed to master.

Thanks Jonathan!