Bug 34257

Summary: Library limitations for item types not respected when batch modding items
Product: Koha Reporter: Lucas Gass (lukeg) <lucas>
Component: CirculationAssignee: Lucas Gass (lukeg) <lucas>
Status: RESOLVED FIXED QA Contact: Victor Grousset/tuxayo <victor>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, gmcharlt, kyle.m.hall, victor
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00,23.05.04,22.11.10
Circulation function:
Attachments: Bug 34257: Limit item types by branch in batchMod.pl
Bug 34257: Limit item types by branch in batchMod.pl
Bug 34257: Limit item types by branch in batchMod.pl
Bug 34257: (QA follow-up): tidy up code

Description Lucas Gass (lukeg) 2023-07-11 23:04:42 UTC
To recreate:

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.
Comment 1 Lucas Gass (lukeg) 2023-08-18 14:47:08 UTC
Created attachment 154660 [details] [review]
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.
Comment 2 Matt Blenkinsop 2023-08-22 08:41:03 UTC
Created attachment 154686 [details] [review]
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 <matt.blenkinsop@ptfs-europe.com>
Comment 3 Victor Grousset/tuxayo 2023-09-03 23:55:18 UTC
Created attachment 155182 [details] [review]
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 <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 4 Victor Grousset/tuxayo 2023-09-03 23:55:21 UTC
Created attachment 155183 [details] [review]
Bug 34257: (QA follow-up): tidy up code
Comment 5 Victor Grousset/tuxayo 2023-09-04 00:24:03 UTC
Works, makes sense, QA script happy, code looks good :)

Unless Katrin wants to look at something in particular and finds an issue this should be good to go. I'll ping them about it.
Comment 6 Katrin Fischer 2023-09-04 11:28:22 UTC
(In reply to Victor Grousset/tuxayo from comment #5)
> Works, makes sense, QA script happy, code looks good :)
> 
> Unless Katrin wants to look at something in particular and finds an issue
> this should be good to go. I'll ping them about it.

I think I just got distracted - sorry for that. Updating QA contact to Victor, please Pass QA.
Comment 7 Victor Grousset/tuxayo 2023-09-06 21:20:46 UTC
Alright, let's go :)
Comment 8 Tomás Cohen Arazi (tcohen) 2023-09-12 12:43:31 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 9 Fridolin Somers 2023-09-14 18:07:46 UTC
Pushed to 23.05.x for 23.05.04
Comment 10 Matt Blenkinsop 2023-09-15 10:21:59 UTC
Nice work everyone!

Pushed to oldstable for 22.11.x