Bugzilla – Attachment 68203 Details for
Bug 19454
Add the ability to filter on patron category for borrowers-force-messaging-defaults.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19454: (Follow-up) Add a total line when updating
Bug-19454-Follow-up-Add-a-total-line-when-updating.patch (text/plain), 1.43 KB, created by
Marcel de Rooy
on 2017-10-17 12:32:00 UTC
(
hide
)
Description:
Bug 19454: (Follow-up) Add a total line when updating
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-10-17 12:32:00 UTC
Size:
1.43 KB
patch
obsolete
>From f3df9c6a4010188b410db9a5d7fdf763551880d2 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 16 Oct 2017 13:08:22 +0200 >Subject: [PATCH] Bug 19454: (Follow-up) Add a total line when updating >Content-Type: text/plain; charset=utf-8 > >Test plan: >[1] Run the script with -doit and -cat [some_category] and verify that > the printed total is correct. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > misc/maintenance/borrowers-force-messaging-defaults.pl | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/misc/maintenance/borrowers-force-messaging-defaults.pl b/misc/maintenance/borrowers-force-messaging-defaults.pl >index e9745f9..0ba85e4 100755 >--- a/misc/maintenance/borrowers-force-messaging-defaults.pl >+++ b/misc/maintenance/borrowers-force-messaging-defaults.pl >@@ -57,6 +57,7 @@ sub force_borrower_messaging_defaults { > $sql .= " AND categorycode = ?" if $category; > my $sth = $dbh->prepare($sql); > $sth->execute($since, $category || () ); >+ my $cnt = 0; > while ( my ($borrowernumber, $categorycode) = $sth->fetchrow ) { > print "$borrowernumber: $categorycode\n"; > next unless $doit; >@@ -64,8 +65,10 @@ sub force_borrower_messaging_defaults { > borrowernumber => $borrowernumber, > categorycode => $categorycode, > } ); >+ $cnt++; > } > $dbh->commit(); >+ print "Total borrowers updated: $cnt\n" if $doit; > } > > >-- >2.1.4
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 19454
:
68176
|
68177
|
68202
|
68203
|
69205
|
69206
|
71654
|
71655
|
72849
|
72850
|
72851
|
72852
|
72853
|
72854
|
73067
|
73068
|
73069