Bug 29308

Summary: Regression: NewItemsDefaultLocation should not be applied to items.permanent_location
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: dch, gveranis, hannah.co, m.de.rooy
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28895
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

Description Andrew Fuerste-Henry 2021-10-22 14:41:18 UTC
21.05 made changes to NewItemsDefaultLocation that break the intended use of the feature.

In 20.05 and earlier versions, the value in NewItemsDefaultLocation was only put in items.location. Items.permanent_location would be set to the items' intended eventual location, allowing it to later be updated using UpdateItemLocationOnCheckin.

In 21.05, the value from NewItemsDefaultLocation is written into BOTH items.location and items.permanent_location, thereby breaking the usage with UpdateItemLocationOnCheckin.

To recreate:
- have shelving locations PROC and GEN
- set NewItemsDefaultLocation to PROC
- find or create a bib
- add an item, do not select a shelving location
- add a second item, select shelving location GEN
- use SQL to confirm location and permanent_location (select itemnumber, barcode, location, permanent_location from items where biblionumber=X)
- first item has location=PROC, permanent_location=PROC
- second item item has location=GEN, permanent_location=GEN

Were you to follow the same test plan on 20.05:
- first item has location=PROC, permanent_location=NULL
- second item item has location=PROC, permanent_location=GEN
Comment 1 Andrew Fuerste-Henry 2021-10-22 14:42:25 UTC
Intentionally filing a new bug, even though Bug 13311 - NewItemsDefaultLocation preference should not populate items.permanent_location is out there from years ago
Comment 2 George Veranis 2022-04-12 10:49:58 UTC
Μaybe should be a good option to add a second preference with value Yes/No to ask if librarian needs to set that temporary location later also as permanent location and add this logic also to the appropriate code.