[Bug 32696] New: Recalls can inadvertently extend the due date
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32696 Bug ID: 32696 Summary: Recalls can inadvertently extend the due date Change sponsored?: --- Product: Koha Version: 22.05 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: ephetteplace@cca.edu QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com If an item is due sooner than the recall due date interval then placing a recall on it can inadvertently extend the book's due date, possibly causing the recalling patron to receive the item later than they would otherwise. To recreate the issue: - turn on recalls with UseRecalls and scaffold out the minimal circulation rules needed to use the feature - set the recall due date interval to 7 days or any other arbitrary period - check out an item to one patron & set the due date to be before the recall due date interval will have elapsed (e.g. the next day) - as a second patron, place a recall on the item in question Actual behavior: the item's due date is extended to the current date plus the recalls due date interval. Desired behavior: the item's due date should stay the same so the recalling patron doesn't face an additional delay in obtaining it. The logic is that the new due date should be either the existing due date or the current date plus the recall due date interval, whichever is sooner. -- 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=32696 Kelly McElligott <kelly@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |minor CC| |kelly@bywatersolutions.com --- Comment #1 from Kelly McElligott <kelly@bywatersolutions.com> --- I am changing this from an enhancement bug to a minor bug, as this is an issue with the due dates of recalls. -- 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=32696 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=36209 CC| |januszop@gmail.com --- Comment #2 from Janusz Kaczmarek <januszop@gmail.com> --- The issue with adjusting the checkout due date when placing recall is even more complicated and weird. Consider the following scenario: 1. the issue is already overdue when placing the recall and has fine accruing; 2. adjusting due date, as it is now, stop accruing (since there is no longer overdue - cf. fines.pl); 3. when in turn, for such a case, a recall overdues, the previous fine will be overwritten by a new sum calculated from recall overdue fines. But, if we didn't update the checkout due date, the new fine would be calculated as a product of total overdue days and recall overdue fine. In case when the recall overdue fine were different (like e.g. 5 x the regular overdue fine), the newly calculated fine would be surprisingly high. This leads to the conclusion that the issue is not as simple. The checkout due date should definitely not be moved forward, but the method of fine calculation should probably be modified. This may mean that we should record the recall due date separately (in the recalls table?). -- 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=32696 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- 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=32696 --- Comment #3 from Janusz Kaczmarek <januszop@gmail.com> --- Created attachment 168640 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168640&action=edit Bug 32696: Recalls can inadvertently extend the due date If an item is due sooner than the recall due date interval then placing a recall on it can inadvertently extend the book's due date, possibly causing the recalling patron to receive the item later than they would otherwise. Test plan: ========= 1. Turn on recalls with UseRecalls. 2. In circulation rules, set the recall due date interval to 7 days or any other arbitrary period. 3. Check out an item to one patron & set the due date to be before the recall due date interval will have elapsed (e.g. the next day) 4. As a second patron, place a recall on the item in question. 5. See that the item's due date is extended to the current date plus the recalls due date interval. 6. Apply the patch, restart_all; 7. Repeat steps 3. and 4. See that the due date has not been extended. BTW, the calculation of $due_interval has been changed, because with the current code and empty 'Recall due date interval' $due_interval is undefined, despite the intention of the author of the code. (after calling get_effective_rule $recall_due_date_interval is defined, but $recall_due_date_interval->rule_value is undefined; the patron gets a message: '... return the item within days, by ...' - no days count). Sponsored-by: Ignatianum University in Cracow -- 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=32696 --- Comment #4 from Janusz Kaczmarek <januszop@gmail.com> --- Created attachment 168641 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168641&action=edit Bug 32696: Unit tests Added unit tests. -- 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=32696 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- 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=32696 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #168640|0 |1 is obsolete| | Attachment #168641|0 |1 is obsolete| | --- Comment #5 from Roman Dolny <roman.dolny@jezuici.pl> --- Created attachment 168764 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168764&action=edit Bug 32696: Recalls can inadvertently extend the due date If an item is due sooner than the recall due date interval then placing a recall on it can inadvertently extend the book's due date, possibly causing the recalling patron to receive the item later than they would otherwise. Test plan: ========= 1. Turn on recalls with UseRecalls. 2. In circulation rules, set the recall due date interval to 7 days or any other arbitrary period. 3. Check out an item to one patron & set the due date to be before the recall due date interval will have elapsed (e.g. the next day) 4. As a second patron, place a recall on the item in question. 5. See that the item's due date is extended to the current date plus the recalls due date interval. 6. Apply the patch, restart_all; 7. Repeat steps 3. and 4. See that the due date has not been extended. BTW, the calculation of $due_interval has been changed, because with the current code and empty 'Recall due date interval' $due_interval is undefined, despite the intention of the author of the code. (after calling get_effective_rule $recall_due_date_interval is defined, but $recall_due_date_interval->rule_value is undefined; the patron gets a message: '... return the item within days, by ...' - no days count). Sponsored-by: Ignatianum University in Cracow Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> -- 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=32696 --- Comment #6 from Roman Dolny <roman.dolny@jezuici.pl> --- Created attachment 168765 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168765&action=edit Bug 32696: Unit tests Added unit tests. Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> -- 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=32696 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl Assignee|koha-bugs@lists.koha-commun |januszop@gmail.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=32696 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=32696 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #168764|0 |1 is obsolete| | --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 170438 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170438&action=edit Bug 32696: Recalls can inadvertently extend the due date If an item is due sooner than the recall due date interval then placing a recall on it can inadvertently extend the book's due date, possibly causing the recalling patron to receive the item later than they would otherwise. Test plan: ========= 1. Turn on recalls with UseRecalls. 2. In circulation rules, set the recall due date interval to 7 days or any other arbitrary period. 3. Check out an item to one patron & set the due date to be before the recall due date interval will have elapsed (e.g. the next day) 4. As a second patron, place a recall on the item in question. 5. See that the item's due date is extended to the current date plus the recalls due date interval. 6. Apply the patch, restart_all; 7. Repeat steps 3. and 4. See that the due date has not been extended. BTW, the calculation of $due_interval has been changed, because with the current code and empty 'Recall due date interval' $due_interval is undefined, despite the intention of the author of the code. (after calling get_effective_rule $recall_due_date_interval is defined, but $recall_due_date_interval->rule_value is undefined; the patron gets a message: '... return the item within days, by ...' - no days count). Sponsored-by: Ignatianum University in Cracow Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> 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=32696 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #168765|0 |1 is obsolete| | --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 170439 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170439&action=edit Bug 32696: Unit tests Added unit tests. Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> 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=32696 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 | Version|22.05 |Main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32696 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aleisha@catalyst.net.nz --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Makes sense to me. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32696 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32696 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.11! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32696 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable Version(s)|24.11.00 |24.11.00,24.05.04 released in| | CC| |lucas@bywatersolutions.com --- Comment #11 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 24.05.x for upcoming 24.05.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32696 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|24.11.00,24.05.04 |24.11.00,24.05.04,23.11.10 released in| | Status|Pushed to stable |Pushed to oldstable CC| |fridolin.somers@biblibre.co | |m --- Comment #12 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.11.x for 23.11.10 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32696 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #13 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 23.05.x unless requested -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32696 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to oldstable |RESOLVED --- Comment #14 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org