Bug 28440

Summary: Inventory tool tries to put a time into DateLastSeen
Product: Koha Reporter: Andrew Fuerste-Henry <andrew>
Component: ToolsAssignee: Bugs List <koha-bugs>
Status: CLOSED WORKSFORME QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: dcook, dstephen, martin.renvoize
Version: 20.05   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28015
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on:    
Bug Blocks: 31143    

Description Andrew Fuerste-Henry 2021-05-24 20:40:03 UTC
When using the inventory tool, Koha attempts to write a date and time into the datelastseen field. Since that's a date field, the update fails and the item ends up with 0000-00-00 for the date.
Comment 1 Andrew Fuerste-Henry 2021-05-26 12:07:09 UTC
This may be a red herring. I thought I saw this behavior on a library's site but have been unable to recreate thus far.
Comment 2 Andrew Fuerste-Henry 2021-05-27 12:49:21 UTC
Still fighting with this, but running theory is it fails in the afternoon if one is using 12-hour time.
Comment 3 Andrew Fuerste-Henry 2021-06-01 20:55:01 UTC
I've been able to recreate this behavior on 20.05, but only in the afternoon :)

To recreate:
- Set TimeFormat to 12 Hour
- make sure cataloging log is on
- wait until afternoon
- have an item with barcode "TEST" and callnumber "9999"
- in Inventory, upload a text file of just the barcode "TEST," limit inventory to callnumber range 9999-9999
- submit inventory, it tells you it set Date Last Seen to today for 1 item
- go to item, confirm it shows a null Date Last Seen
- look at the modification log, see Koha tried to put a date and time into Date Last Seen
Comment 4 Katrin Fischer 2021-06-03 17:45:46 UTC
I've tried to replicate the issue on master, but it all seemed to work alright.