[Bug 44045] New: A waiting recall can expire before the pickup date the patron was given
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44045 Bug ID: 44045 Summary: A waiting recall can expire before the pickup date the patron was given Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: babarjunaid1122@gmail.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle@bywatersolutions.com Target Milestone: --- When a recalled item is checked in at the pickup library, circ/returns.pl sets the recall waiting with an expiration date from Koha::Recall->calc_expirationdate. The recall is later expired by misc/cronjobs/recalls/expire_recalls.pl. The two read the recall_shelf_time rule differently: - calc_expirationdate looks the rule up for the circulation control library (or the patron's library) and, for a biblio-level recall whose item has just been checked in, with no item type at all (it only finds an item through item_level or a current checkout, and the checkout has just ended). - expire_recalls.pl looks it up for the pickup library and the item type of the waiting item. So with an item-type rule of 5 days and RecallsMaxPickUpDelay = 7, the screen and the notice say the item waits until today + 7, but the job expires the recall after 5 days. Separately, when no rule applies, expire_recalls.pl expires a recall that has waited >= RecallsMaxPickUpDelay days, while with a rule it waits > recall_shelf_time days. With the preference alone the recall is expired on the last day the patron was told it would wait. To reproduce: 1. UseRecalls on, RecallsMaxPickUpDelay = 7. 2. Circulation rules: recall_shelf_time ("Recall pickup period") = 5 for one item type, nothing for All. 3. Check out an item of that type, place a record-level recall on it for another patron, check the item in at the recall's pickup library and confirm the recall. 4. The recall shows waiting until today + 7, but expire_recalls.pl expires it after 5 days. Reproduced on Koha 26.05.02; the same code is on main. -- 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=44045 --- Comment #1 from babar junaid <babarjunaid1122@gmail.com> --- Created attachment 211190 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211190&action=edit Bug 44045: Give a waiting recall the expiration date the expiry job uses Bug 44045: Give a waiting recall the expiration date the expiry job uses Koha::Recall->calc_expirationdate read the recall_shelf_time rule for the circulation control library and, for a record-level recall whose item has just been checked in, with no item type. misc/cronjobs/recalls/expire_recalls.pl reads it for the pickup library and the waiting item's type. With an item-type rule shorter than RecallsMaxPickUpDelay, the patron was told a later date than the one the job expired the recall on. This patch: - lets circ/returns.pl pass the checked-in item to calc_expirationdate; - reads the rule for the recall's pickup library and that item, as the job does; - makes the job keep a recall that has waited exactly RecallsMaxPickUpDelay days, as it already does for recall_shelf_time. Test plan: 1. prove t/db_dependent/Koha/Recall.t t/db_dependent/Koha/Recalls.t The new calc_expirationdate subtests fail without the patch. 2. Set UseRecalls on, RecallsMaxPickUpDelay = 7. 3. In circulation rules, set "Recall pickup period" = 5 for one item type (leave All / All empty). 4. Check out an item of that type, place a record-level recall on the record for another patron, check the item in at the recall's pickup library and confirm the recall. 5. Without the patch the recall waits until today + 7; with it, today + 5, the date expire_recalls.pl will expire it on. 6. Apply the patch, repeat 4 and confirm today + 5. Sponsored-by: Koha Solutions -- 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=44045 babar junaid <babarjunaid1122@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |babarjunaid1122@gmail.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org