Bugzilla – Attachment 16440 Details for
Bug 9045
Adding some parameters to export_borrowers.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 9045 - Adding some parameters to export_borrowers.pl
SIGNED-OFF-Bug-9045---Adding-some-parameters-to-ex.patch (text/plain), 1.97 KB, created by
Owen Leonard
on 2013-03-19 19:03:39 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 9045 - Adding some parameters to export_borrowers.pl
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2013-03-19 19:03:39 UTC
Size:
1.97 KB
patch
obsolete
>From e8a2b329ad1f7fa54fd13aa776e6fd0d5c84d96d Mon Sep 17 00:00:00 2001 >From: Sophie Meynieux <sophie.meynieux@biblibre.com> >Date: Mon, 18 Mar 2013 15:29:42 +0100 >Subject: [PATCH] [SIGNED-OFF] Bug 9045 - Adding some parameters to > export_borrowers.pl >Content-Type: text/plain; charset="utf-8" > >Followup : Adding test if results has some records and usage example for >--where clause > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >I infer from the bug comments that a proper test for this patch is to >check how the script reacts if it returns no results with a --where >clause, and to verify that there is a good usage example for the --where >option. These are both true, so I think this passes. >--- > misc/export_borrowers.pl | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > >diff --git a/misc/export_borrowers.pl b/misc/export_borrowers.pl >index e4fa7b0..7d3ce47 100755 >--- a/misc/export_borrowers.pl >+++ b/misc/export_borrowers.pl >@@ -50,7 +50,10 @@ $0 -h > If no separator is specifield, a comma will be used. > -H, --show-header Print field names on first row > -w, --where=CONDITION Condition to filter borrowers to export >- (SQL where clause) >+ (SQL where clause). >+ CONDITION must be enclosed by double quotes and >+ if needed, where value by single quotes. >+ example : --where "surname='De Lattre'" > -h, --help Show this help > > USAGE >@@ -88,7 +91,7 @@ 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 > # We retrieve the first borrower informations to get field names >-my ($borrowernumber) = $sth->fetchrow_array; >+my ($borrowernumber) = $sth->fetchrow_array or die "No borrower to export"; > my $member = GetMemberDetails($borrowernumber); > @fields = keys %$member unless (@fields); > >-- >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 9045
:
13362
|
13363
|
13923
|
16249
|
16440
|
16578
|
16579