https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44050

--- Comment #1 from Pedro Amorim (ammopt) <[email protected]> ---
Hi all,

Since bug 42218, yearly usage (erm_usage_yus) is no longer stored at import. It
is rebuilt by Koha::ERM::EUsage::YearlyUsages->rebuild, which sums the monthly
usage (erm_usage_mus) grouped by the monthly key columns.

When this bug adds access_method to erm_usage_mus and lifts the Regular
restriction, the yearly side needs the same treatment:
1) Add the access_method column to the erm_usage_yus table
2) Add it to the GROUP BY in YearlyUsages->rebuild
(Koha/ERM/EUsage/YearlyUsages.pm)
Without both, the yearly totals mix Regular and TDM usage.

Also:
3) The database update should fill in access_method for the existing monthly
and yearly rows (all Regular since bug 42218)
4) Add a test checking that every erm_usage_mus column is either grouped,
summed or deliberately skipped in YearlyUsages->rebuild, so a future column
can't be missed (e.g. it would fail if access_method was added to erm_usage_mus
but not to the rebuild GROUP BY)

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to