Bug 38237

Summary: Add logging to erm_run_harvester cronjob
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: Command-line UtilitiesAssignee: Nick Clemens (kidclamp) <nick>
Status: RESOLVED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, jesse, lucas, pedro.amorim, robin
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00,24.05.06,23.11.11
Circulation function:
Attachments: Bug 38237: Add logging to erm_run_harvester cronjob
Bug 38237: Add POD
Bug 38237: Add logging to erm_run_harvester cronjob
Bug 38237: Add POD

Description Nick Clemens (kidclamp) 2024-10-23 12:21:52 UTC

    
Comment 1 Nick Clemens (kidclamp) 2024-10-23 12:56:07 UTC
Created attachment 173211 [details] [review]
Bug 38237: Add logging to erm_run_harvester cronjob

This patch simply adds logging to the cronjob

To test:
1 - Enable CronjobLog
    http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=CronjobLog
2 - Enable ERMModule
    http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ERMModule
3 - Home -> E-resource Management -> Data providers -> New data provider
    Fill from registry or create your own, but change the URL and put in any required numbers
    We don't need a real test, just to run the ob
4 - perl misc/cronjobs/erm_run_harvester.pl --begin-date 2024-01-01 --dry-run --debug
5 - View the logs, no log of the script
6 - Apply patches
7 - Run the job again
8 - Check logs
9 - Success!
Comment 2 Nick Clemens (kidclamp) 2024-10-23 12:56:09 UTC
Created attachment 173212 [details] [review]
Bug 38237: Add POD

This patch adds POD to the script and rpelaces the custom help script with pod2usage

TO test:
perl misc/cronjobs/erm_run_harvester.pl
Confirm you get helpful usage data
Comment 3 Pedro Amorim 2024-10-23 14:26:54 UTC
Created attachment 173219 [details] [review]
Bug 38237: Add logging to erm_run_harvester cronjob

This patch simply adds logging to the cronjob

To test:
1 - Enable CronjobLog
    http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=CronjobLog
2 - Enable ERMModule
    http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ERMModule
3 - Home -> E-resource Management -> Data providers -> New data provider
    Fill from registry or create your own, but change the URL and put in any required numbers
    We don't need a real test, just to run the ob
4 - perl misc/cronjobs/erm_run_harvester.pl --begin-date 2024-01-01 --dry-run --debug
5 - View the logs, no log of the script
6 - Apply patches
7 - Run the job again
8 - Check logs
9 - Success!

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 4 Pedro Amorim 2024-10-23 14:26:57 UTC
Created attachment 173220 [details] [review]
Bug 38237: Add POD

This patch adds POD to the script and rpelaces the custom help script with pod2usage

TO test:
perl misc/cronjobs/erm_run_harvester.pl
Confirm you get helpful usage data

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 5 Pedro Amorim 2024-10-23 14:32:55 UTC
Skipping QA here. Happy to have it put back to SO if Katrin decides to do so!
Comment 6 Katrin Fischer 2024-10-23 17:04:24 UTC
Love to see the improved documentation!
Comment 7 Katrin Fischer 2024-10-23 17:19:03 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 8 Lucas Gass (lukeg) 2024-11-20 18:44:59 UTC
Backported to 24.05.x for upcoming 24.05.06
Comment 9 Fridolin Somers 2024-12-13 14:59:09 UTC
Pushed to 23.11.x for 23.11.11
Comment 10 Jesse Maseto 2025-02-03 16:50:14 UTC
Not pushed to LTS. Marked Resolved.

If you feel this should be in LTS please reply with your reason.