Bug 34257 - Library limitations for item types not respected when batch modding items
Summary: Library limitations for item types not respected when batch modding items
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Lucas Gass
QA Contact: Victor Grousset/tuxayo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-11 23:04 UTC by Lucas Gass
Modified: 2023-12-28 20:47 UTC (History)
4 users (show)

See Also:
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


Attachments
Bug 34257: Limit item types by branch in batchMod.pl (1.27 KB, patch)
2023-08-18 14:47 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 34257: Limit item types by branch in batchMod.pl (1.35 KB, patch)
2023-08-22 08:41 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 34257: Limit item types by branch in batchMod.pl (1.39 KB, patch)
2023-09-03 23:55 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review
Bug 34257: (QA follow-up): tidy up code (1001 bytes, patch)
2023-09-03 23:55 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass 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 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 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