Bug 26026

Summary: cleanup_database does not allow to purge data created today
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Command-line UtilitiesAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: robin
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24152
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Jonathan Druart 2020-07-20 12:24:42 UTC
The query is built with WHERE expiration < date_sub(CURDATE(), INTERVAL ? DAY), which truncate to day

MariaDB [koha_kohadev]> SELECT DATE_SUB(CURDATE(), INTERVAL 0 DAY);
+-------------------------------------+
| DATE_SUB(CURDATE(), INTERVAL 0 DAY) |
+-------------------------------------+
| 2020-07-20                          |
+-------------------------------------+

It makes it impossible to remove the data from today.