Bug 41062

Summary: Expand cronjob erm_run_harvester.pl with parameter for providers
Product: Koha Reporter: Michaela Sieber <michaela.sieber>
Component: Command-line UtilitiesAssignee: Raphael Straub <raphael.straub>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: clemens.tubach, jan.kissig, katrin.fischer, robin
Version: Main   
Hardware: All   
OS: All   
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
Bug 41062: Add an option to erm_run_harvester.pl to specify provider IDs

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>