Bug 32017 - Database update makes returned items show as checked out in circulation history
Summary: Database update makes returned items show as checked out in circulation history
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-27 13:52 UTC by Katrin Fischer
Modified: 2022-10-27 13:52 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2022-10-27 13:52:57 UTC
The database update for 20.11.03 caues 2 issues:

* It updated the timestamp to the time of the update and didn't preserve the previous one.
* The NULL values show up in the circulation history as still checked out, I asusme the template checks for content of the field after doing a union of issues and old issues. And an emptry returndate = still checked out (staff interface)

The NULL is ok, the timestamp can't be saved... but we could make the template smarter.

$DBversion = '20.11.03.002';
if( CheckVersion( $DBversion ) ) {

    sanitize_zero_date('aqorders', 'datecancellationprinted');
    sanitize_zero_date('old_issues', 'returndate');

    NewVersion( $DBversion, 7806, "Remove remaining possible 0000-00-00 values");
}