Bug 41335 - Toggling the hold options does not always work in opac-reserve
Summary: Toggling the hold options does not always work in opac-reserve
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Marcel de Rooy
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-12-01 13:47 UTC by Marcel de Rooy
Modified: 2025-12-03 15:24 UTC (History)
3 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 41335: Adjust toggling hold options, preselect lone item (4.96 KB, patch)
2025-12-03 14:47 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 41335: Adjust toggling hold options, preselect lone item (5.01 KB, patch)
2025-12-03 15:22 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2025-12-01 13:47:52 UTC
Some combinations of OPACMandatoryHoldDates together with forced item level holds make the options collapsed while they should be expanded.
Comment 1 Marcel de Rooy 2025-12-01 13:49:33 UTC
Relation with DisplayMultiItemHolds ?
Comment 2 Marcel de Rooy 2025-12-01 13:51:07 UTC
(In reply to Marcel de Rooy from comment #1)
> Relation with DisplayMultiItemHolds ?

Just another small issue: if there is only one item, we should probably preselect.
Comment 3 Marcel de Rooy 2025-12-03 14:47:00 UTC Comment hidden (obsolete)
Comment 4 Marcel de Rooy 2025-12-03 15:22:44 UTC
Created attachment 190120 [details] [review]
Bug 41335: Adjust toggling hold options, preselect lone item

By default hold options are collapsed. In the following cases they
are expanded:
- one of the hold dates is made mandatory via OPACMandatoryHoldDates
- an item level hold is forced for this biblio (at least one item is
  controlled by a circ rule where opacitemholds == F [Forced] )

When DisplayMultiItemHolds is enabled, item selection for specific items
is done via checkboxes; no item is preselected unless there is only one.
Otherwise an item is selected via radio buttons. The first one is
preselected.

Test plan:
Verify in steps 2 to 4 that the above rules are respected.
[1] Enable DisplayMultiItemHolds and OPACAllowHoldDateInFuture.
[2] Place hold on biblio with only one item where record and item level are allowed.
[3] Place hold on biblio with multiple items where item level is forced.
[4] Place hold on biblio with multiple items where item level is not forced.
[5] Toggle OPACMandatoryHoldDates (between no hold dates and another value) and repeat 2-4
[6] Disable DisplayMultiItemHolds and repeat 2-5

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 5 Marcel de Rooy 2025-12-03 15:24:15 UTC
Second version counts holdable items only for preselection of checkboxes.