https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42218 --- Comment #16 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 209999 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209999&action=edit Bug 42218: Remove erm_usage_yus references from the code Yearly usage rows were written by CounterFile per COUNTER file: the months of one file were summed and the row was deduplicated on a hash that included the total. A re-harvest of the same year with a different total added a second row, and a year spread over two files gave two partial totals. The yearly numbers were wrong and could not be repaired. The next patches replace the erm_usage_yus table with a view that sums erm_usage_mus per year. This patch removes every writer first so the switch is safe: - CounterFile no longer builds or stores yearly usage entries - UsageObject->yearly_usages is a plain getter, the same as erm_usage_yuses - Koha::ERM::EUsage::YearlyUsage->store and ->delete throw, the object is read-only - the SUSHI harvester job report drops the added_yus and skipped_yus counters and the template no longer shows them Assisted-by: Sonnet 5 (Anthropic) Signed-off-by: Clemens Tubach <clemens.tubach@kit.edu> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.