[Bug 16413] New: Prototype for GetLatestAutoRenewDate and GetSoonestRenewDate should be changed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16413 Bug ID: 16413 Summary: Prototype for GetLatestAutoRenewDate and GetSoonestRenewDate should be changed Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: enhancement 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 Depends on: 16344 Currently the 2 GetLatestAutoRenewDate and GetSoonestRenewDate subroutines takes $borrowernumber and $itemnumber in parameter. They refetch the patron, item and issue information but they already are available from where they are called. It would make sense to change the prototype of these 2 subroutines to accept the patron, item and issue information directly to avoid unnecessary refetches. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16344 [Bug 16344] Add a circ rule to limit the auto renewals given a specific date -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16413 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=16413 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 51100 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51100&action=edit Bug 16413: Change prototype GetLatestAutoRenewDate Currently the 2 GetLatestAutoRenewDate and GetSoonestRenewDate subroutines takes $borrowernumber and $itemnumber in parameter. They refetch the patron, item and issue information but they already are available from where they are called. It would make sense to change the prototype of these 2 subroutines to accept the patron, item and issue information directly to avoid unnecessary refetches. Test plan: Make sure this change does not introduce regressions on bug 15581 and bug 16344. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16413 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 51101 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51101&action=edit Bug 16413: Change prototype of GetSoonestRenewDate Same change as previous patch for the GetSoonestRenewDate subroutine. Test plan: Make sure this change does not introduce regressions on bug 7413. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16413 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=15581 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16413 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |srdjan@catalyst.net.nz --- Comment #3 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- I think this one needs rebasing -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16413 --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Srdjan Jankovic from comment #3)
I think this one needs rebasing
Apply cleanly on top of dependencies (bug 15581 and bug 16344). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16413 --- Comment #5 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 51101 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51101 Bug 16413: Change prototype of GetSoonestRenewDate Review of attachment 51101: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=16413&attachment=51101) ----------------------------------------------------------------- ::: circ/renew.pl @@ +78,5 @@
if ( $error && ($error eq 'too_soon' or $error eq 'auto_too_soon') ) { $soonest_renew_date = C4::Circulation::GetSoonestRenewDate( + { + borrower => $borrower->unblessed,
shouldn't this be: patron => $borrower->unblessed, ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16413 --- Comment #6 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 51100 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51100 Bug 16413: Change prototype GetLatestAutoRenewDate Review of attachment 51100: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=16413&attachment=51100) ----------------------------------------------------------------- ::: circ/renew.pl @@ +84,5 @@
} if ( $error && ( $error eq 'auto_too_late' ) ) { $latest_auto_renew_date = C4::Circulation::GetLatestAutoRenewDate( + { + borrower => $borrower->unblessed,
shouldn't this be: patron => $borrower->unblessed, ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16413 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51100|0 |1 is obsolete| | Attachment #51101|0 |1 is obsolete| | --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 58671 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58671&action=edit Bug 16413: Change prototype of GetLatestAutoRenewDate Currently the 2 GetLatestAutoRenewDate and GetSoonestRenewDate subroutines takes $borrowernumber and $itemnumber in parameter. They refetch the patron, item and issue information but they already are available from where they are called. It would make sense to change the prototype of these 2 subroutines to accept the patron, item and issue information directly to avoid unnecessary refetches. Test plan: Make sure this change does not introduce regressions on bug 15581 and bug 16344. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16413 --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 58672 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58672&action=edit Bug 16413: Change prototype of GetSoonestRenewDate Same change as previous patch for the GetSoonestRenewDate subroutine. Test plan: Make sure this change does not introduce regressions on bug 7413. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16413 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #58671|0 |1 is obsolete| | --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 61514 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61514&action=edit Bug 16413: Change prototype of GetLatestAutoRenewDate Currently the 2 GetLatestAutoRenewDate and GetSoonestRenewDate subroutines takes $borrowernumber and $itemnumber in parameter. They refetch the patron, item and issue information but they already are available from where they are called. It would make sense to change the prototype of these 2 subroutines to accept the patron, item and issue information directly to avoid unnecessary refetches. Test plan: Make sure this change does not introduce regressions on bug 15581 and bug 16344. Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16413 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #58672|0 |1 is obsolete| | --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 61515 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61515&action=edit Bug 16413: Change prototype of GetSoonestRenewDate Same change as previous patch for the GetSoonestRenewDate subroutine. Test plan: Make sure this change does not introduce regressions on bug 7413. Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16413 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |martin.renvoize@ptfs-europe | |.com --- Comment #11 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Acting as git gopher to Jonathan Field who did the testing and actual signoff. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16413 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #12 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #7)
Test plan: Make sure this change does not introduce regressions on bug 15581 and bug 16344.
Test plan? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16413 --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Marcel de Rooy from comment #12)
(In reply to Jonathan Druart from comment #7)
Test plan: Make sure this change does not introduce regressions on bug 15581 and bug 16344.
Test plan?
Could you be more verbose please, I do not understand the question. Yes the test plan is to test that the patches from bugs 15581 and 16344 are still ok. At the moment of writing, none was pushed and so the goal was to test it on top of them and QA them at the same time. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16413 Bug 16413 depends on bug 16344, which changed state. Bug 16344 Summary: Add a circ rule to limit the auto renewals given a specific date https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16344 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16413 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |kyle@bywatersolutions.com Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #61514|0 |1 is obsolete| | Attachment #61515|0 |1 is obsolete| | --- Comment #14 from Kyle M Hall <kyle@bywatersolutions.com> --- Calls to GetSoonestRenewDate haven't been updated in opac-user.pl and svc/checkouts at the very least. --- Comment #15 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 65405 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=65405&action=edit Bug 16413: Change prototype of GetLatestAutoRenewDate Currently the 2 GetLatestAutoRenewDate and GetSoonestRenewDate subroutines takes $borrowernumber and $itemnumber in parameter. They refetch the patron, item and issue information but they already are available from where they are called. It would make sense to change the prototype of these 2 subroutines to accept the patron, item and issue information directly to avoid unnecessary refetches. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16413 --- Comment #16 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 65406 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=65406&action=edit Bug 16413: Change prototype of GetSoonestRenewDate Same change as previous patch for the GetSoonestRenewDate subroutine. This is not finished, 2 other calls could not be updated (performance issue). They may be later, when objects will be used in svc/checkouts and opac-user.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16413 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16413 Janet McGowan <janet.mcgowan@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |janet.mcgowan@ptfs-europe.c | |om -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16413 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #17 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Jonathan, do you want to keep this one open or should we close it MOVED as it should be fixed within the Koha namespace? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16413 --- Comment #18 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I will take care of this when it will be possible, when svc/checkouts and opac-user.pl will use Koha::Checkout objects. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16413 --- Comment #19 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Jonathan Druart from comment #18)
I will take care of this when it will be possible, when svc/checkouts and opac-user.pl will use Koha::Checkout objects.
That's what I was thinking - because we will probably kill those off anyway :) -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org