Bug 33325

Summary: UpdateItemLocationOnCheckin message should accurately report when location set to null
Product: Koha Reporter: Andrew Fuerste-Henry <andrew>
Component: CatalogingAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: m.de.rooy
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Andrew Fuerste-Henry 2023-03-23 16:50:36 UTC
To recreate:
1 - set UpdateItemLocationOnCheckin to "_ALL_: _PERM_"
2 - have an item where items.permanent_location is null but items.location is not null
3 - check your item in, get message that location was updated, including wording "New value: "Blank""
4 - check your item in the database, confirm location has been set to NULL rather than blank

Getting location to have a value with permanent_location is null takes some niche setup to accomplish in the staff interface. See this comment for instructions, but it'd be easier to just set up a test item from the database:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33301#c2

The UpdateItemLocationOnCheckin syspref contains the option to set things to "_BLANK_" at checkin. When that option is used, things are actually set to blank (items.location='') rather than NULL, so in those cases the message *is* accurate.