https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42386 --- Comment #60 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 203519 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203519&action=edit Bug 42386: (follow-up) Restore branch/itemtype filtering on reservesallowed The reservesallowed count was checking ALL patron holds regardless of branch or itemtype, breaking per-branch and per-itemtype hold limits. The old C4::Reserves code filtered the count by: - Branch (items.homebranch or borrowers.branchcode per ReservesControlBranch) - Itemtype (when the matching rule was itemtype-specific) This patch restores that behavior: - Item::Availability::Hold retrieves the rule object to get its itemtype - Passes rule_itemtype to Patron::Availability::Hold - The reservesallowed count filters by control branch (when ItemHomeLibrary) and by rule itemtype (when the rule is itemtype-specific) Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/Patron/Availability/Hold.t \ t/db_dependent/Koha/Item/Availability/Hold.t \ t/db_dependent/Koha/Biblio/Availability/Hold.t \ t/db_dependent/Holds.t \ t/db_dependent/Reserves.t => SUCCESS: Tests pass! 3. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.