Bug 38054

Summary: Select the item for single holdable item record with DisplayMultiItemHolds
Product: Koha Reporter: Eric Phetteplace <ephetteplace>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low    
Version: Main   
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:
Bug Depends on: 15565    
Bug Blocks:    

Description Eric Phetteplace 2024-10-01 19:15:35 UTC Comment hidden (obsolete)
Comment 1 Eric Phetteplace 2024-10-01 19:30:45 UTC
When DisplayMultiItemHolds is on AND item-level holds are forced in your circulation rules, if you attempt to place a hold on a record with a single holdable item in the OPAC, formerly the single item was a radio button and selected by default (makes sense, there are no other options). If you turn on DisplayMultiItemHolds and do the same, the item is selected via a checkbox input which is not selected by default.

Steps to recreate:

- Turn on DisplayMultiItemHolds
- Force item-level holds (e.g. set "OPAC item level holds" to "Force" for all patron categories and item types)
- Find or create a bib record with a single holdable item
- Go to the record in the OPAC and select "Place hold"

Expected:

- The only option in the items table is selected, because there is no other choice for users.

Actual:

- The single item is not selected so users must click the checkbox input.

I can imagine two solutions: 1) auto-select the checkbox if there's only one item, 2) actually revert to the old behavior where it's a radio button input. The latter seems like it's probably needlessly more complicated to implement.