From 3a54432c226493ff43dd1a7a445c7b6923fda7ce Mon Sep 17 00:00:00 2001 From: Laura Escamilla Date: Wed, 3 Apr 2024 12:55:29 +0000 Subject: [PATCH] Bug 36502: Canreservefromotherbranches allows staff to place holds even if independent branches is enabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To test: 1. Enable both the IndependentBranches and canreservefromotherbranches system preferences. 2. Log in to the staff interface with a non-super librarian staff user that has permissions to place holds. 3. Search the catalog for an item. 1. The non-super librarian user should be able to place holds on item from their branch. 2. They should see a “No holds allowed” on items from other branches. 4. Apply the patch and restart_all 5. Repeat step 3 or refresh the page. 1. The non-super librarian can now place holds on items from their branch and other branches. 6. Turn off canreservefromotherbranches 1. The non-super librarian cannot place holds on items from other branches again. 7. Sign off and have a great day! :D Signed-off-by: esther --- Koha/Items.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Items.pm b/Koha/Items.pm index 4089068b34..3c6e49c180 100644 --- a/Koha/Items.pm +++ b/Koha/Items.pm @@ -76,7 +76,7 @@ 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.30.2