[Bug 15742] New: Unnecessary loop in j2a cronjob
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15742 Bug ID: 15742 Summary: Unnecessary loop in j2a cronjob Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org 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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15742 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15742 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 47642 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47642&action=edit 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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15742 --- Comment #2 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 47642 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47642 Bug 15742: Remove unnecessary loop in j2a cronjob Review of attachment 47642: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=15742&attachment=47642) ----------------------------------------------------------------- YIKES! Good catch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15742 --- Comment #3 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 47642 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47642 Bug 15742: Remove unnecessary loop in j2a cronjob Review of attachment 47642: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=15742&attachment=47642) ----------------------------------------------------------------- ::: 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)" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15742 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15742 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #47642|0 |1 is obsolete| | --- Comment #4 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 47658 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47658&action=edit [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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15742 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15742 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #47658|0 |1 is obsolete| | --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 47686 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47686&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15742 --- Comment #6 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 47687 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47687&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15742 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |15758 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15758 [Bug 15758] Move the C4::Branch related code to Koha::Libraries - part 4 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15742 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |brendan@bywatersolutions.co | |m Status|Passed QA |Pushed to Master --- Comment #7 from Brendan Gallagher <brendan@bywatersolutions.com> --- Pushed to Master - Should be in the May 2016 release - Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15742 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |julian.maurice@biblibre.com --- Comment #8 from Julian Maurice <julian.maurice@biblibre.com> --- Patches pushed to 3.22.x, will be in 3.22.4 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15742 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr --- Comment #9 from Frédéric Demians <frederic@tamil.fr> --- This patch has been pushed to 3.20.x, will be in 3.20.9. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org