https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40237
--- Comment #7 from David Nind <[email protected]> --- Created attachment 192681 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192681&action=edit Bug 40237: Make reserve/request.pl use $patron->can_place_holds() This patch updates the staff interface hold placement script to use the centralized patron hold validation method instead of duplicated manual validation logic. Changes: - Replaces manual maxreserves, debt, expiration, and restriction checks with $patron->can_place_holds() method call - Adds staff override support by reading override_* parameters and passing them to the validation method - Updates template to iterate through validation messages array - Enhances all "Place hold" buttons to show red "Place hold with overrides" buttons when AllowHoldPolicyOverride is enabled and validation issues exist - Maintains backward compatibility with existing item-level override functionality This consolidates patron-level hold validation logic across the codebase and provides consistent staff override capabilities in both OPAC and staff interfaces. Test plan: 1. Apply patches and restart services 2. Enable system preference AllowHoldPolicyOverride 3. Create a test patron with various restrictions: - Set expiration date in the past - Add fines exceeding maxoutstanding preference - Mark address as bad (gonenoaddress = 1) - Mark card as lost (lost = 1) - Add a debarment/restriction - Create holds to exceed maxreserves preference 4. Log into staff interface and try to place holds for this patron 5. Verify validation messages appear for each restriction 6. Verify "Place hold with overrides" red buttons appear instead of normal blue buttons 7. Click override button and verify hold is placed successfully 8. Test with single holds, multi-holds, item-level holds, and group holds 9. Disable AllowHoldPolicyOverride and verify normal restriction behavior 10. Verify existing item-level override functionality still works -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ 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/
