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.
Created attachment 47642 [details] [review] 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.
Comment on attachment 47642 [details] [review] Bug 15742: Remove unnecessary loop in j2a cronjob Review of attachment 47642 [details] [review]: ----------------------------------------------------------------- YIKES! Good catch.
Comment on attachment 47642 [details] [review] Bug 15742: Remove unnecessary loop in j2a cronjob Review of attachment 47642 [details] [review]: ----------------------------------------------------------------- ::: misc/cronjobs/j2a.pl @@ -178,4 @@ > } 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) { What's scarier is I added: print "PROCESSING $branchcode\n"; "PROCESSING HASH(0x3645b50)"
Created attachment 47658 [details] [review] [SIGNED-OFF] 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>
Created attachment 47686 [details] [review] 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>
Created attachment 47687 [details] [review] Bug 15742 [QA Followup] - Tidy script Script does not appear to have any other modifying patches at this time based on bz splitter. This is a perfect time to clean up this script! Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Pushed to Master - Should be in the May 2016 release - Thanks!
Patches pushed to 3.22.x, will be in 3.22.4
This patch has been pushed to 3.20.x, will be in 3.20.9.