From 640ce248d93143a9781fec064675a64d668cb68d Mon Sep 17 00:00:00 2001 From: Laura_Escamilla Date: Sat, 30 Aug 2025 01:28:02 +0000 Subject: [PATCH] Bug 36502: Canreservefromotherbranches allows staff to place holds even if independent branches is enabled --- Koha/Items.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Koha/Items.pm b/Koha/Items.pm index 7ac9f034ae..035f0e3197 100644 --- a/Koha/Items.pm +++ b/Koha/Items.pm @@ -107,7 +107,12 @@ sub filter_by_for_hold { withdrawn => 0, notforloan => { '<=' => 0 }, # items with negative or zero notforloan value are holdable ( C4::Context->preference('AllowHoldsOnDamagedItems') ? () : ( damaged => 0 ) ), - ( C4::Context->only_my_library() ? ( homebranch => C4::Context::mybranch() ) : () ), + ( + C4::Context->only_my_library() + && !C4::Context->preference('canreservefromotherbranches') + ? ( homebranch => C4::Context::mybranch() ) + : () + ), }; if ( C4::Context->preference("item-level_itypes") ) { -- 2.39.5