[Bug 30167] New: Return soonest renewal date when CanBookBeRenewed returns %too_soon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 Bug ID: 30167 Summary: Return soonest renewal date when CanBookBeRenewed returns %too_soon Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org There are several places where we fetch the soonest renewal date when CanBookBeRenewed returns too soon We have already calculated this date and should pass it back -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 131046 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=131046&action=edit Bug 30167: Return soonest renewal date when renewal is to soon This patch adds an 'info' return param to CanBookBeRenewed and passes the soonest renewal date when returning too_soon errors To test: 1 - prove -v t/db_dependent/Circulation.t Fix whitespace -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 131047 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=131047&action=edit Bug 30167: Use returned renewal date rather than fetching This patch updates the three scripts that fetched the soonest renewal date to use the return from CanBookBeRenewed To test: 1 - Set a circulation rule with a 'no renewal before' set to 3, loan length set to 5 2 - Check out an item to a patron that uses this rule 3 - Verify the checkouts for the patron show the correct 'No renewal before' date 4 - Sign in to the patron's opac account 5 - Verify the item shows it cannot be renewed, and shows the correct date 6 - Go to Circulation->Renew 7 - Attempt to renew using barcode 8 - Confirm error shows the soonest renewal date -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |30168 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30168 [Bug 30168] Use checkout object in GetSoonestRenewDate -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=30004 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Status|Needs Signoff |Patch doesn't apply --- Comment #3 from David Nind <david@davidnind.com> --- Patch no longer applies 8-(.. git bz apply 30167 Bug 30167 - Return soonest renewal date when CanBookBeRenewed returns %too_soon 131046 - Bug 30167: Return soonest renewal date when renewal is to soon 131047 - Bug 30167: Use returned renewal date rather than fetching Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 30167: Return soonest renewal date when renewal is to soon Using index info to reconstruct a base tree... M C4/Circulation.pm M t/db_dependent/Circulation.t Falling back to patching base and 3-way merge... Auto-merging t/db_dependent/Circulation.t CONFLICT (content): Merge conflict in t/db_dependent/Circulation.t Auto-merging C4/Circulation.pm error: Failed to merge in the changes. Patch failed at 0001 Bug 30167: Return soonest renewal date when renewal is to soon -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #131046|0 |1 is obsolete| | --- Comment #4 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 134082 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134082&action=edit Bug 30167: Return soonest renewal date when renewal is to soon This patch adds an 'info' return param to CanBookBeRenewed and passes the soonest renewal date when returning too_soon errors To test: 1 - prove -v t/db_dependent/Circulation.t Fix whitespace -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #131047|0 |1 is obsolete| | --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 134083 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134083&action=edit Bug 30167: Use returned renewal date rather than fetching This patch updates the three scripts that fetched the soonest renewal date to use the return from CanBookBeRenewed To test: 1 - Set a circulation rule with a 'no renewal before' set to 3, loan length set to 5 2 - Check out an item to a patron that uses this rule 3 - Verify the checkouts for the patron show the correct 'No renewal before' date 4 - Sign in to the patron's opac account 5 - Verify the item shows it cannot be renewed, and shows the correct date 6 - Go to Circulation->Renew 7 - Attempt to renew using barcode 8 - Confirm error shows the soonest renewal date -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 David Nind <david@davidnind.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=30167 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134082|0 |1 is obsolete| | --- Comment #6 from David Nind <david@davidnind.com> --- Created attachment 134197 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134197&action=edit Bug 30167: Return soonest renewal date when renewal is to soon This patch adds an 'info' return param to CanBookBeRenewed and passes the soonest renewal date when returning too_soon errors To test: 1 - prove -v t/db_dependent/Circulation.t Fix whitespace Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134083|0 |1 is obsolete| | --- Comment #7 from David Nind <david@davidnind.com> --- Created attachment 134198 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134198&action=edit Bug 30167: Use returned renewal date rather than fetching This patch updates the three scripts that fetched the soonest renewal date to use the return from CanBookBeRenewed To test: 1 - Set a circulation rule with a 'no renewal before' set to 3, loan length set to 5 2 - Check out an item to a patron that uses this rule 3 - Verify the checkouts for the patron show the correct 'No renewal before' date 4 - Sign in to the patron's opac account 5 - Verify the item shows it cannot be renewed, and shows the correct date 6 - Go to Circulation->Renew 7 - Attempt to renew using barcode 8 - Confirm error shows the soonest renewal date Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 --- Comment #8 from David Nind <david@davidnind.com> --- Testing notes (koha-testing-docker): - Tested on 04/28/2022 (American date format) with . 'no renewal before' set to 3 . 'loan period' set to 5 - Checked out on date is 04/28/2022 00:09 - For the patron from the checkouts: No renewal before 04/30/2022 - When trying to renew, the message is: "Cannot renew: Programming Perl / ( 39999000011418 ) cannot be renewed before 04/30/2022. " - Date is calculated correctly including the current day (3 days - 28th, 29th + 30th) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- + ($ok,$error,$info) = &CanBookBeRenewed($borrowernumber, $itemnumber[, $override_limit]); Find out whether a borrowed item may be renewed. + $info will contain the soonest renewal date if the error is 'too soon' I would suggest to let $info either be a hash containing a key for soonest renewal date (among others, room for extension) in order to honor its name or rename it to soonestrenewaldate. This is somewhat obsure. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Changing status to get some feedback on Marcel's last comment. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 --- Comment #11 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 134380 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134380&action=edit Bug 30167: (follow-up) Return a hash with soonest_renew_date -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Medium patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 --- Comment #12 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- FAIL koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt FAIL valid_template Attempt to reload Koha/Template/Plugin/Branches.pm aborted. Compilation failed in require at /usr/lib/x86_64-linux-gnu/perl5/5.28/Template/Plugins.pm line 206. I am going to ignore this one. It pops up now and then on some reports. And several people have not succeeded in finding the exact cause. See also https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27944#c46 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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=30167 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134197|0 |1 is obsolete| | --- Comment #13 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 134454 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134454&action=edit Bug 30167: Return soonest renewal date when renewal is to soon This patch adds an 'info' return param to CanBookBeRenewed and passes the soonest renewal date when returning too_soon errors To test: 1 - prove -v t/db_dependent/Circulation.t Fix whitespace Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134198|0 |1 is obsolete| | --- Comment #14 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 134455 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134455&action=edit Bug 30167: Use returned renewal date rather than fetching This patch updates the three scripts that fetched the soonest renewal date to use the return from CanBookBeRenewed To test: 1 - Set a circulation rule with a 'no renewal before' set to 3, loan length set to 5 2 - Check out an item to a patron that uses this rule 3 - Verify the checkouts for the patron show the correct 'No renewal before' date 4 - Sign in to the patron's opac account 5 - Verify the item shows it cannot be renewed, and shows the correct date 6 - Go to Circulation->Renew 7 - Attempt to renew using barcode 8 - Confirm error shows the soonest renewal date Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134380|0 |1 is obsolete| | --- Comment #15 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 134456 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134456&action=edit Bug 30167: (follow-up) Return a hash with soonest_renew_date Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 --- Comment #16 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Not sure about 'major' btw. More like an enhancement. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 --- Comment #17 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Marcel de Rooy from comment #16)
Not sure about 'major' btw. More like an enhancement.
could be less than major - but can affect performance, so not an enh, should be eligible for backport -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=29537 CC| |fridolin.somers@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Patch doesn't apply --- Comment #18 from Fridolin Somers <fridolin.somers@biblibre.com> --- Sorry, does not apply any anymore since Bug 29537 was pushed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134454|0 |1 is obsolete| | --- Comment #19 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 134576 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134576&action=edit Bug 30167: Return soonest renewal date when renewal is to soon This patch adds an 'info' return param to CanBookBeRenewed and passes the soonest renewal date when returning too_soon errors To test: 1 - prove -v t/db_dependent/Circulation.t Fix whitespace Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134455|0 |1 is obsolete| | --- Comment #20 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 134577 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134577&action=edit Bug 30167: Use returned renewal date rather than fetching This patch updates the three scripts that fetched the soonest renewal date to use the return from CanBookBeRenewed To test: 1 - Set a circulation rule with a 'no renewal before' set to 3, loan length set to 5 2 - Check out an item to a patron that uses this rule 3 - Verify the checkouts for the patron show the correct 'No renewal before' date 4 - Sign in to the patron's opac account 5 - Verify the item shows it cannot be renewed, and shows the correct date 6 - Go to Circulation->Renew 7 - Attempt to renew using barcode 8 - Confirm error shows the soonest renewal date Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134456|0 |1 is obsolete| | --- Comment #21 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 134578 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134578&action=edit Bug 30167: (follow-up) Return a hash with soonest_renew_date Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 --- Comment #22 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 134579 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134579&action=edit Bug 30167: (follow-up) Compare dt objects -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |22.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 --- Comment #23 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to master for 22.05, thanks to everybody involved 🦄 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30167 --- Comment #24 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 135016 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135016&action=edit Bug 30167: [21.11.x] Return soonest renewal date when renewal is to soon This patch adds an 'info' return param to CanBookBeRenewed and passes the soonest renewal date when returning too_soon errors To test: 1 - prove -v t/db_dependent/Circulation.t Fix whitespace Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Bug 30167: Use returned renewal date rather than fetching This patch updates the three scripts that fetched the soonest renewal date to use the return from CanBookBeRenewed To test: 1 - Set a circulation rule with a 'no renewal before' set to 3, loan length set to 5 2 - Check out an item to a patron that uses this rule 3 - Verify the checkouts for the patron show the correct 'No renewal before' date 4 - Sign in to the patron's opac account 5 - Verify the item shows it cannot be renewed, and shows the correct date 6 - Go to Circulation->Renew 7 - Attempt to renew using barcode 8 - Confirm error shows the soonest renewal date Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Bug 30167: (follow-up) Return a hash with soonest_renew_date Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Bug 30167: (follow-up) Compare dt objects -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org