Bug 40737 - Usage statistics data provider "Import logs" table does not render if "Imported by": "Cronjob"
Summary: Usage statistics data provider "Import logs" table does not render if "Import...
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: ERM (show other bugs)
Version: 25.05
Hardware: All All
: P5 - low normal
Assignee: Pedro Amorim
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-09-01 12:20 UTC by Pedro Amorim
Modified: 2025-10-22 10:27 UTC (History)
7 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Crowdfunding goal: 0
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' (1.93 KB, patch)
2025-09-01 13:03 UTC, Pedro Amorim
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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.
Comment 2 Michaela Sieber 2025-10-17 09:54:14 UTC
We have tested this and in Main it is already fixed (with bug 38201) 

@Pedro: is this Patch for older Versions until 25.05. ?
Comment 3 Pedro Amorim 2025-10-22 10:27:34 UTC
(In reply to Michaela Sieber from comment #2)
> We have tested this and in Main it is already fixed (with bug 38201) 
> 
> @Pedro: is this Patch for older Versions until 25.05. ?

Thank you Michaela, bug 38201 was not in main when this patch was written. You're right that it is fixed by it. I've retested this for 25.05.x and confirmed the bug exists + this patch fixes it there, because of that I'm updating the Version of this bug to 25.05. Thank you.