Bug 41062 - Expand cronjob erm_run_harvester.pl with parameter for providers
Summary: Expand cronjob erm_run_harvester.pl with parameter for providers
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Raphael Straub
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-21 11:55 UTC by Michaela Sieber
Modified: 2025-10-25 18:12 UTC (History)
4 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: Sponsored
Crowdfunding goal: 0
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 41062: Add an option to erm_run_harvester.pl to specify provider IDs (4.23 KB, patch)
2025-10-22 08:08 UTC, Raphael Straub
Details | Diff | Splinter Review
Bug 41062: Add an option to erm_run_harvester.pl to specify provider IDs (4.39 KB, patch)
2025-10-25 18:12 UTC, Jan Kissig
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Michaela Sieber 2025-10-21 11:55:40 UTC
We would like to have an option to define the providers that are used to run the SUSHI harvesting for COUNTER Reports in the ERM module.
The script will check if these providers are active (as before)
If the parameter for provider_id is not used all active providers will be harvested (as before)
The parameter provider_id is repeatable.

We will provide a patch soon.


Chapter in Manual: https://koha-community.org/manual/latest/en/html/cron_jobs.html#cron-ermrunharvester-label

New Parameter to add to the manual:

--provider-id or -p

provider that will be harvested. This parameter is repeatable
Comment 1 Raphael Straub 2025-10-22 08:08:13 UTC
Created attachment 188268 [details] [review]
Bug 41062: Add an option to erm_run_harvester.pl to specify provider IDs

This patch adds a new option to define the providers in cronjob erm_run_harvester.pl
that are used to run the SUSHI harvesting for COUNTER Reports in the ERM module.
Use parameter --provider-id or -p
The parameter provider_id is repeatable.
If the parameter for provider_id is not used all active providers will be harvested (as before).
The script will check if these providers are active (as before).

To test:
- Run the script and make sure that all active providers are harvested.
- Apply patch.
- Run the script with only one provider-id.
- Run the script with two provider-ids by using -p 1 -p 2
- Run the script without the parameter.
- Make sure that in all cases only active providers are harvested.
- Sign off :-).

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Comment 2 Jan Kissig 2025-10-25 18:12:43 UTC
Created attachment 188440 [details] [review]
Bug 41062: Add an option to erm_run_harvester.pl to specify provider IDs

This patch adds a new option to define the providers in cronjob erm_run_harvester.pl
that are used to run the SUSHI harvesting for COUNTER Reports in the ERM module.
Use parameter --provider-id or -p
The parameter provider_id is repeatable.
If the parameter for provider_id is not used all active providers will be harvested (as before).
The script will check if these providers are active (as before).

Script to run on ktd: perl misc/cronjobs/erm_run_harvester.pl --begin-date 2025-09-01 --end-date 2025-09-30

To test:
- Run the script and make sure that all active providers are harvested.
- Apply patch.
- Run the script with only one provider-id.
- Run the script with two provider-ids by using -p 1 -p 2
- Run the script without the parameter.
- Make sure that in all cases only active providers are harvested.
- Sign off :-).

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>