From f5699d65e59477b40544b832602c9d69a1893d5c Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Fri, 18 Aug 2023 14:45:14 +0000 Subject: [PATCH] Bug 34257: Limit item types by branch in batchMod.pl To test: 1. Go to Item types administration. 2. Set some items types to be limited to a branch you are not logged in as. 3. Find some items from the branch you are logged in at and go to Batch item modification. 4. Add the barcodes and attempt to edit the item type to the one you limited in step 2. 5. You can change these item types to ones that your branch should not be able to. 6. Apply patch 7. Try steps 4 -5 again but this time you should not see item types in the dropdown that are limited to other branches. Signed-off-by: Matt Blenkinsop Signed-off-by: Victor Grousset/tuxayo Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 13d5ff94248df32623853ed2d87258f81edc0a8f) Signed-off-by: Fridolin Somers (cherry picked from commit b7e93600614770f16cc26da7c6ee50dd8ebc5e0f) Signed-off-by: Matt Blenkinsop --- tools/batchMod.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/batchMod.pl b/tools/batchMod.pl index 31a61b7046..495fed4244 100755 --- a/tools/batchMod.pl +++ b/tools/batchMod.pl @@ -276,6 +276,7 @@ if ($op eq "show"){ ignore_not_allowed_subfields => 1, kohafields_to_ignore => ['items.barcode'], prefill_with_default_values => $use_default_values, + branch_limit => C4::Context->userenv->{"branch"}, default_branches_empty => 1, } ); -- 2.39.2