Bugzilla – Attachment 38895 Details for
Bug 9892
export_borrowers.pl separator should default to the 'delimiter' syspref value
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 9892: Make export_borrowers.pl using the delimiter pref
SIGNED-OFF-Bug-9892-Make-exportborrowerspl-using-t.patch (text/plain), 1.47 KB, created by
Bernardo Gonzalez Kriegel
on 2015-05-06 17:36:41 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 9892: Make export_borrowers.pl using the delimiter pref
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2015-05-06 17:36:41 UTC
Size:
1.47 KB
patch
obsolete
>From fa2a0f854779e5c694ac2db0c23d48388f9fad5a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Thu, 9 Apr 2015 15:49:14 +0200 >Subject: [PATCH] [SIGNED-OFF] 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 >--- > misc/export_borrowers.pl | 5 +++++ > 1 file changed, 5 insertions(+) > >diff --git a/misc/export_borrowers.pl b/misc/export_borrowers.pl >index a9ecb3d..4f29f31 100755 >--- a/misc/export_borrowers.pl >+++ b/misc/export_borrowers.pl >@@ -87,6 +87,11 @@ $query .= " ORDER BY borrowernumber"; > my $sth = $dbh->prepare($query); > $sth->execute; > >+unless ( $separator ) { >+ $separator = C4::Context->preference('delimiter') || ','; >+ $separator = "\t" if ($separator eq 'tabulation'); >+} >+ > my $csv = Text::CSV->new( { sep_char => $separator, binary => 1 } ); > > # If the user did not specify any field to export, we assume he wants them all >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 9892
:
37619
|
38895
|
38967
|
38968
|
38969
|
38970