Bug 26026 - cleanup_database does not allow to purge data created today
Summary: cleanup_database does not allow to purge data created today
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-20 12:24 UTC by Jonathan Druart
Modified: 2020-07-20 12:24 UTC (History)
1 user (show)

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


Attachments

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