Bugzilla – Attachment 47686 Details for
Bug 15742
Unnecessary loop in j2a cronjob
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15742: Remove unnecessary loop in j2a cronjob
Bug-15742-Remove-unnecessary-loop-in-j2a-cronjob.patch (text/plain), 1.85 KB, created by
Kyle M Hall (khall)
on 2016-02-05 11:43:36 UTC
(
hide
)
Description:
Bug 15742: Remove unnecessary loop in j2a cronjob
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2016-02-05 11:43:36 UTC
Size:
1.85 KB
patch
obsolete
>From 4e56b2e0be65b185b7352f573268a41af4b58940 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 4 Feb 2016 13:25:14 +0000 >Subject: [PATCH] Bug 15742: Remove unnecessary loop in j2a cronjob > >If no branchcode is given, all the libraries are retrieved and the same >query (so without using the libraries loop) is executed for each >library. > >Test plan: >Use the j2a.pl cronjob to change the category of a child patron >If a branchcode is passed to the script, only the children from this >branchcode should be updated. >But if it is not passed, all children of the DB should be updated. > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > misc/cronjobs/j2a.pl | 3 --- > 1 file changed, 3 deletions(-) > >diff --git a/misc/cronjobs/j2a.pl b/misc/cronjobs/j2a.pl >index 4000b6a..744a65f 100755 >--- a/misc/cronjobs/j2a.pl >+++ b/misc/cronjobs/j2a.pl >@@ -130,7 +130,6 @@ if(not $fromcat && $tocat) { #make sure we've specified the info we need. > cronlogaction(); > > my $dbh=C4::Context->dbh; >-my @branches = C4::Branch::GetBranches(); > #get today's date, format it and subtract upperagelimit > my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); > $year +=1900; >@@ -178,7 +177,6 @@ if ( not $noaction) { > } else { print "Updated $res patrons\n"; } > } else { # branch was not supplied, processing all branches > $verbose and print "Looking in all branches for patrons to update from $fromcat to $tocat that were born before $itsyourbirthday\n"; >- foreach my $branchcode (@branches) { > my $query=qq|UPDATE borrowers > SET guarantorid ='0', > categorycode =? >@@ -190,7 +188,6 @@ if ( not $noaction) { > if ($res eq '0E0') { print "No patrons updated\n"; > } else { print "Updated $res patrons\n"; } > } >- } > } else { > my $birthday; > if ( $mybranch ) { >-- >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 15742
:
47642
|
47658
| 47686 |
47687