In /erm/eusage/usage_data_providers when you run an import for a data source, the list of corresponding jobs is displayed above the table ("Job for report type DR has been queued. Check job progress.") It would be nice if this information were automatically updated once the job is completed ("Job for report type DR is completed. Check job details.") This may not be technically possible ?
I see this information will be added in the widget on the ERM home page https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39320 But it could be added too in erm/eusage/usage_data_providers page
As far as I can see the widget only displays if the job is still running or completed / cancelled. What you would like to see is the error code and message. This is the SQL-Statement which gives you the option to find the background jobs type erm_sushi_harvester that ended with an error (for example if no data were available or if the request was queued, etc.) : SELECT CONCAT('<a target="_blank" href=\"/cgi-bin/koha/admin/background_jobs.pl?op=view&id=',bj.id,'\">', bj.id, '</a>' ) AS "Job-ID", bj.enqueued_on AS 'Date/time', CONCAT('<a target="_blank" href=\"/cgi-bin/koha/erm/eusage/usage_data_providers/', JSON_VALUE(bj.data,'$.ud_provider_id'), '\">', JSON_VALUE(bj.data,'$.ud_provider_id'), '</a>' ) AS "Provider-ID", JSON_VALUE(bj.data,'$.ud_provider_name') AS 'provider name', JSON_VALUE(bj.data,'$.report_type') AS 'Report', JSON_VALUE(bj.data,'$.begin_date') AS 'report begin_date', JSON_VALUE(bj.data,'$.end_date') AS 'report end_date', JSON_VALUE(bj.data,'$.messages[0].code') AS 'error code', JSON_VALUE(bj.data,'$.messages[0].message') AS 'error message' FROM background_jobs bj WHERE type='erm_sushi_harvester' AND JSON_VALUE(bj.data,'$.messages[0].type')='error' /* #All jobs with type error in data column, e.g. No Usage Available for Requested Dates (3030) or Usage Not Ready for Requested Dates (3031) or Fatal - Service Not Available (1000) or Error - Requestor Not Authorized to Access Service (2000) */ AND DATE(bj.enqueued_on) BETWEEN <<from|date>> AND <<to|date>> ORDER BY bj.enqueued_on DESC