Bug 33523

Summary: 'Holds queue' and 'holds to pull' targets items on record level holds that should not fill the hold
Product: Koha Reporter: Lisette Scheer <lisette>
Component: Hold requestsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: catrina, chughesman, gmcharlt, holly, kebliss, rcoert, trevor.diamond
Version: unspecified   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Lisette Scheer 2023-04-13 14:14:30 UTC
Holds queue doesn't check if a branch's item can fill the hold if at least one item is available on the record for a bib level hold

To recreate: 

• Have ReservesControlBranch set to "item's home library"
• Have at least 2 libraries. 
• Set the circulation rules so that a patron type can place holds on an item type at library A
• Set the circulation rules so that the same patron type cannot place holds on or have any checkouts on the same item type at library B
• Make a record with at least 2 items, one at library A and one at library B. 
• Place a bib level hold for a patron matching the patron type in the rules
• Run holds to pull for both branches
• The item should only show on  Library A's list, but it also shows on library B. 

Library B doesn't allow checkout of those items for that patron type. 

The same thing also happens if there are separate item types on the same record, such as a public copy and a staff copy. The staff copy will try to fill the hold even though it can only be held and loaned by staff. 

Lisette
Comment 1 Rebecca Coert 2024-07-17 15:35:07 UTC
We can confirm that this behavior is still occurring a year later.  Our technical services department cannot retrieve non-circulating items from the branches, which they should be able to hold and check out based on the loan rules. We've had to modify workarounds and reports to retrieve these items.
Comment 2 Katrin Fischer 2024-07-17 18:59:03 UTC
(In reply to Rebecca Coert from comment #1)
> We can confirm that this behavior is still occurring a year later.  Our
> technical services department cannot retrieve non-circulating items from the
> branches, which they should be able to hold and check out based on the loan
> rules. We've had to modify workarounds and reports to retrieve these items.

Hi Rebecca, is this maybe a different bug?
If the item is marked as 'for reference' or 'not for loan' these settings will overrule the circulation conditions and that would be the currently expected behavior, they cannot fill holds. There is another bug for an enhancement that would allow it: bug 35299
Comment 3 Carolyn Hughesman 2024-10-25 16:41:46 UTC
This is probably the number one complaint I get from my libraries.  Bib-level holds are placed on records with different item types.  Some item types allow holds from any library, other item types only allow holds from patrons whose home library matches the item's home library. Holds queue seems to pull a random available item when it fills a hold.

Holds queue should be checking the hold rules to see if that item can indeed fill the hold.
Comment 4 trevor.diamond 2025-08-28 19:10:37 UTC
I'm on 24.11 in a cooperative and this issue is causing a lot of staff confusion.  However, I think I may have identified a behavior that might help a little with a workaround?  Need someone else to test/verify though. 

Standard set of circulation rules has an item type policy that LIBTHINGS is local holds only. 
Have a bib with holdings at libraries A through G.
Patron From A places a hold, which is allowed because that library has a copy.  Library A is checked out though.
The holds queue now has the request for Library A patron for the item at Library B.

This is obviously not correct, since B's item would only be for B.  I think that is what this bug is about?

TEST WORKAROUND:
Place an item type hold policy on Library B for local holds only (the same as in the standard rules, but applying it at the library level instead of the standard level for all libraries).

Wait for the holds queue to rebuild.

Check if the Patron A request is on any queue.

When I did this in my system, the hold request not only got removed from the queue at Library B, but it didn't show up for ANY of the libraries that had on the shelf copies. This seems to imply that when there only a standard item type hold policy, the system won't always pay attention.  But if there is a library level item type policy, then the system will check first the library level policies and THEN the system level policies.

Does this make sense to anyone?  The stadnard policy didn't apply until there was also at least one library level policy on the same item type.  But then then standard policy was correctly applied to all other libraries (so the request will only show up for Library A when that copy is available and none of the other libraries were asked even though the library level policy was only applied to one library).