https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44045

--- Comment #1 from babar junaid <[email protected]> ---
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.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to