https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42999
--- Comment #2 from David Nind <[email protected]> --- Created attachment 201683 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201683&action=edit Bug 42999: Fix $valid_items flag contamination in reserve/request.pl $valid_items was set inside the per-item availability check but used as the gate of a separate if block, causing it to carry over across loop iterations. Once any item set it to 1, all subsequent items entered the if ($valid_items) branch and received $item->{available} = 1 regardless of their individual availability. Fix: merge the two consecutive if blocks into one so the pickup-location logic only executes when the current item individually passes all availability conditions. $valid_items continues to serve its correct post-loop role (line 661: none_available_override). Regression introduced by Bug 38412 (commit 1900effc9b). Steps to follow: 1. Create a biblio with at least two items: one with a holdable item type and one with a not-for-loan item type (itemtypes.notforloan=1). The not-for-loan item must have a higher itemnumber than at least one holdable item (i.e. it is processed later in the loop). 2. Open reserve/request.pl?biblionumber=X&borrowernumber=Y 3. Observe that the not-for-loan item shows a radio button and a pickup location dropdown despite the Information column showing "Not for loan (Itemtype not for loan)" — bug confirmed. 4. Apply this patch and restart services. If running under Plack, restarting Plack is required for the change to take effect. 5. Reload the place-hold page. 6. Verify the not-for-loan item now shows "X Not for loan" without a radio button or pickup location dropdown. 7. Verify the holdable items still show radio buttons and pickup location dropdowns correctly. Signed-off-by: Adolfo Rodríguez <[email protected]> Signed-off-by: David Nind <[email protected]> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
