Support #1426
openBug 32440 - Allow selective deletion of statistics entries based on type by cleanup_database
Updated by Lari Taskula 4 months ago
ยท Edited
Before we can start automatically purging statistics, we must make sure to not lose any important statistical data.
Currently pseudonymizing statistics only targets statistics.type of issue, renew, return and onsite_checkout, while there are other types of statistics like item_found, item_lost, localuse, writeoff and payment. These other types would currently not be migrated into pseudonymized_transactions (See Bug 32438, and Bug 34628) and would automatically be deleted by cleanup_database as there is currently no way of selecting which types to delete or keep.
Also, Koha::Statistics->pseudonymize() currently demands statistics.borrowernumber to exist. This means statistics rows with no borrowernumber are not converted into pseudonymized transactions yet.