Bug 31187

Summary: Regression, Permanent shelving location is always updated when editing location VIA BATCH ITEM MOD if both are mapped to MARC fields
Product: Koha Reporter: Andrew Fuerste-Henry <andrewfh>
Component: CatalogingAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: m.de.rooy, spyros.pierros
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 30909    
Bug Blocks:    

Description Andrew Fuerste-Henry 2022-07-19 14:27:58 UTC
Bug 30909 handled this bug in the single item editor. It also exists in batch item mod.

Same test plan applies, but use item batch modification for all of the edits:

1: create new subfield in DEFAULT framework, 952$k, visible in editor, managed in tab 10, tied to LOC auth value
2: In Koha to MARC mapping, find items.permanent_location and add a mapping to 952$k
3: Find a bib and item in the default framework
4: Edit the item, see that both the 952$c and 952$k are visible in the editor -- In my test, both fields started at a value of "General Stacks"
5: change both values and save the item, confirm both values change and save successfully -- I set 952$c to Audio Visual and 952$k to Fiction
6: edit again, change only 952$c, save -- I changed 952$c to On Display and left 952$k set to Fiction

THIS IS WHERE THINGS GO WRONG. After saving that change, both 952$c AND 952$k are set to On Display, even though I only changed the 952$c.