Bug 29308 - Regression: NewItemsDefaultLocation should not be applied to items.permanent_location
Summary: Regression: NewItemsDefaultLocation should not be applied to items.permanent_...
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: master
Hardware: All All
: P5 - low major with 10 votes (vote)
Assignee: Bugs List
QA Contact: Testopia
Depends on:
Reported: 2021-10-22 14:41 UTC by Andrew Fuerste-Henry
Modified: 2022-04-12 10:49 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


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