Bug 38237 - Add logging to erm_run_harvester cronjob
Summary: Add logging to erm_run_harvester cronjob
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Nick Clemens (kidclamp)
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-23 12:21 UTC by Nick Clemens (kidclamp)
Modified: 2025-02-03 16:50 UTC (History)
5 users (show)

See Also:
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 (1.95 KB, patch)
2024-10-23 12:56 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 38237: Add POD (5.08 KB, patch)
2024-10-23 12:56 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 38237: Add logging to erm_run_harvester cronjob (2.01 KB, patch)
2024-10-23 14:26 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38237: Add POD (5.14 KB, patch)
2024-10-23 14:26 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 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.