Bug 40737

Summary: Usage statistics data provider "Import logs" table does not render if "Imported by": "Cronjob"
Product: Koha Reporter: Pedro Amorim <pedro.amorim>
Component: ERMAssignee: Pedro Amorim <pedro.amorim>
Status: Needs Signoff --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: jeremy.evans, jonathan.druart, jonathan.field, martin.renvoize, matt.blenkinsop, michaela.sieber, pedro.amorim
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 40737: Fix rendering 'Cronjob'

Description Pedro Amorim 2025-09-01 12:20:07 UTC

    
Comment 1 Pedro Amorim 2025-09-01 13:03:47 UTC
Created attachment 186017 [details] [review]
Bug 40737: Fix rendering 'Cronjob'

Test plan, k-t-d, before applying patch (requires data provider SUSHI credentials):
1) Enable ERMModule
2) Create a new data provider, visit:
  <staff_url>/cgi-bin/koha/erm/eusage/usage_data_providers/add
3) Add the required credentials (customer id, requestor id) and at least one report type e.g. TR J1
4) Run the cron, e.g.:
  $ perl misc/cronjobs/erm_run_harvester.pl --begin-date 2025-05-01 --end-date 2025-06-01 --debug
5) Wait a few seconds (depending on the harvest job). Visit the data provider page:
<staff_url>/cgi-bin/koha/erm/eusage/usage_data_providers/1
6) Click on the 'Import logs' tab. Notice the datatable never renders.
7) Apply patch. Run the yarn build command:
  $ yarn js:build
8) Repeat 5+6. Notice the table renders normally and shows 'Cronjob' for the import logs generated by the cronjob.