Bug 33405

Summary: Place hold button visible in OPAC search results when no items can be put on hold
Product: Koha Reporter: Caroline Cyr La Rose <caroline.cyr-la-rose>
Component: Hold requestsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Caroline Cyr La Rose 2023-04-04 13:37:24 UTC
When no items in a record can be put on hold (for example, if the library does not allow on-shelf holds, and all items are available), the 'Place hold' button still appears in the search results in the OPAC. This can be confusing to patrons.

To reproduce:
1. Circulation rules must prevent on-shelf holds (I used just one all/all rule with If all unavailable to prevent crossing the streams)
2. In the OPAC, make a search that will give you a couple of results
3. Find a record where all items are available
   --> Place hold button is visible
4. Log in (so that Koha knows your patron category and library)
5. Redo steps 2 and 3
   --> Place hold button is visible
6. Click 'Place hold'
   --> No items can be put on hold