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

--- Comment #1 from Lisette Scheer <[email protected]> ---
Created attachment 211520
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211520&action=edit
Bug 44043: Don't fill item group holds with items from outside the group

When a patron checks out an item, MoveReserve looks for any hold the
patron has on the same record. That lookup accepted any hold with
item_level_hold = 0, which includes item group holds, so checking out
an item from a different item group (or from no item group) filled the
patron's item group hold and marked it F (finished).

This patch limits the lookup to holds without an item group, or holds
on the checked out item's own group, matching how CheckReserves treats
item group holds.

Test plan:
1. Enable EnableItemGroups and EnableItemGroupHolds
2. Create a record with two item groups (e.g. vol. 2 and vol. 3), each
   with an item, plus an item in no group
3. Place a hold for a patron on the vol. 3 item group
4. Check out the vol. 2 item to the same patron
5. Note the item group hold is gone and shows as finished
6. Apply the patch, restart_all
7. Repeat 3-4 (and with the ungrouped item): the hold remains
8. Check out the vol. 3 item: the hold is filled
9. prove t/db_dependent/Reserves.t

Co-Authored-By: Claude Opus 5.5 <[email protected]>

-- 
You are receiving this mail because:
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