https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38822 --- Comment #19 from Clemens Tubach <clemens.tubach@kit.edu> --- Created attachment 209375 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209375&action=edit Bug 38822: Rebuild the data providers summary from the counter logs The summary page showed the earliest and latest usage month per report family, which cost twelve aggregate queries per provider plus the content of every counter file embedded in the response. It now shows one row per harvest year, provider and report type with a status badge for each month, read from the counter log summary API in one request. The provider name opens the provider page. The first three columns can be sorted and filtered; the default order is year descending, then provider and report type. The status labels and badge classes move from the import logs tab to a shared module so both tables render the same badges. The retry badge reads "Retry" on the import logs tab, the summary page and the job page; it read "Retry needed" before. A failed count request no longer leaves the summary page on "Loading". Test plan: 1. With no harvest logs, open eUsage > Data providers > "Data providers summary": the page shows "There are no harvest logs to summarize" 2. Harvest three months for one provider, then open the summary page: one row for the provider, the report type and the harvest year, with a status badge under each harvested month and nothing under the other months. Hover a badge: the tooltip shows the status 3. Harvest a month of a different year and a month of a second report type: the page shows one row per year and per report type, ordered by year descending, then provider, then report type 4. Sort and filter the "Harvest year", "Provider" and "Report type" columns 5. Click the provider name: the provider page opens 6. Run a failing harvest (wrong credentials): the summary shows an "Error" badge for that month. Harvest the month again with correct credentials: the badge changes to "Success", only the latest log of a month counts 7. Check that a badge with the status "Retry" reads "Retry" on the summary page, the Import logs tab and the background job page 8. Edit a provider and save it without changes: no error (the removed earliest/latest fields of the API are no longer sent) 9. The data providers list still shows the "Last run" column 10. prove -l t/db_dependent/Koha/ERM/EUsage/CounterLogSummary.t \ t/db_dependent/api/v1/erm_counter_log_summaries.t \ t/db_dependent/api/v1/erm_usage_data_providers.t 11. yarn cypress run --spec t/cypress/integration/ERM/DataProviders_spec.ts Assisted-by: Fable 5.1 (Anthropic) Signed-off-by: Clemens Tubach <clemens.tubach@kit.edu> -- You are receiving this mail because: You are watching all bug changes.