Circulation: LocalHoldsExclusivityPeriod, LocalHoldsExclusivityPatronControl, LocalHoldsExclusivityItemControl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41410 --- Comment #15 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Test plan: 1. Apply patch, run updatedatabase.pl 2. Verify three new sysprefs exist in Administration > System preferences 3. Set LocalHoldsPriority to "Don't give" (None) 4. Create a library hold group with at least two libraries (e.g. Lib-A, Lib-B) 5. Create a third library (Lib-C) NOT in the hold group 6. Create an item at Lib-B 7. Place a hold for a patron at Lib-A (pickup at Lib-A) 8. Set LocalHoldsExclusivityPeriod to 7, PatronControl to HomeLibrary, ItemControl to homebranch 9. Run the holds queue builder (misc/cronjobs/holds/build_holds_queue.pl) 10. Verify hold_fill_targets.local_holdgroup_match = 1 for that hold (item at Lib-B is in the same hold group as patron at Lib-A) 11. Check in the item at Lib-C — it should NOT fill the hold (exclusivity blocks the non-local item within the 7-day window) 12. Check in the item at Lib-B — it SHOULD fill the hold (local match) 13. Reset: delete the hold, create a new one with a patron at Lib-C (pickup at Lib-C). Run the queue again. 14. Verify hold_fill_targets.local_holdgroup_match = 0 for this hold 15. The item at Lib-B should now fill this hold at Lib-C checkin (non-local patron, no exclusivity protection) 16. Set LocalHoldsExclusivityPeriod to 0 — verify non-local items can fill holds normally regardless of hold_fill_targets flag 17. prove t/db_dependent/Holds/LocalHoldsPriority.t — passes 18. prove t/db_dependent/HoldsQueue.t — passes 19. prove t/db_dependent/Reserves.t — passes Extending the test plan a little to demonstrate more circumstances: * Holds will fill with any item when no local item is available* 20: Set LocalHoldsExclusivityPeriod back to 7 22: Create a 4th library, LIB-D, NOT in hold group 21: Have a bib with items from LIB-A (in hold group), LIB-C (not in hold group), LIB-D (not in hold group) 22: Check the LIB-A item out to some patron 23: Place a bib-level hold for a patron from LIB-A 24: run the queue 25: confirm the queue targets either the LIB-C or LIB-D items and is not flagged as a local_holdgroup_match in the db 26: confirm either the LIB-C or LIB-D item will fill the hold when checked in *Holds will fill with any item when reservedate is outside the exclusivity period* 27: cancel your hold 28: check in your LIB-A item (all items now available) 29: place a new bib-level hold for patron from LIB-A 30: run the queue, confirm it targets LIB-A item and flags it as a local_holdgroup_match in the db 31: in the database, update your hold to set reservedate to a date more than 7 days ago 32: run the queue again 33: confirm it still targets the LIB-A item but does not get flagged as a local_holdgroup_match 34: confirm your hold will capture the LIB-A, LIB-C, or LIB-D items -- You are receiving this mail because: You are watching all bug changes.