Bug 35653

Summary: Allow the patron import script to log it's output to the action_logs cron logging
Product: Koha Reporter: Liz Rea <wizzyrea>
Component: Command-line UtilitiesAssignee: Lucas Gass <lucas>
Status: Needs documenting --- QA Contact: Emily Lamancusa <emily.lamancusa>
Severity: enhancement    
Priority: P5 - low CC: emily.lamancusa, fridolin.somers, laura, lucas, 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.05.00
Circulation function:
Attachments: Bug 35653: Log import_patroni.pl info to action logs
Bug 35653: Log import_patroni.pl info to action logs
Bug 35653: Log import_patroni.pl info to action logs
Bug 35653: (QA follow-up) Perltidy

Description Liz Rea 2023-12-26 22:09:28 UTC
It would be so neat if the import_patrons.pl command line tool had the option to send the brief output to the in-Koha action_logs cron logs, so at least libraries could see easily that the cron had run. Bonus points for useful info in there like what it currently can output on the command line: 


Import complete:
Imported:    0
Overwritten: 1981
Skipped:     0
Invalid:     0
Total:       1981
Comment 1 Lucas Gass 2023-12-27 17:39:45 UTC
Created attachment 160325 [details] [review]
Bug 35653: Log import_patroni.pl info to action logs

To test:
1. APPLY PATCH
2. Create a CSV file with a few lines that contain at least firstname, surname, cardnumber
3. Turn on "CronjobLog".
4. Run the import patron script. I did this: perl /kohadevbox/koha/misc/import_patrons.pl --file 'test1.csv' --matchpoint cardnumber -c
5. Check the action logs for cronjobs.
6. You should see info. about the import patron script.
Comment 2 David Nind 2023-12-31 20:57:44 UTC
Created attachment 160384 [details] [review]
Bug 35653: Log import_patroni.pl info to action logs

To test:
1. APPLY PATCH
2. Create a CSV file with a few lines that contain at least firstname, surname, cardnumber
3. Turn on "CronjobLog".
4. Run the import patron script. I did this: perl /kohadevbox/koha/misc/import_patrons.pl --file 'test1.csv' --matchpoint cardnumber -c
5. Check the action logs for cronjobs.
6. You should see info. about the import patron script.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Emily Lamancusa 2024-02-02 20:24:50 UTC
Created attachment 161727 [details] [review]
Bug 35653: Log import_patroni.pl info to action logs

To test:
1. APPLY PATCH
2. Create a CSV file with a few lines that contain at least firstname, surname, cardnumber
3. Turn on "CronjobLog".
4. Run the import patron script. I did this: perl /kohadevbox/koha/misc/import_patrons.pl --file 'test1.csv' --matchpoint cardnumber -c
5. Check the action logs for cronjobs.
6. You should see info. about the import patron script.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Comment 4 Emily Lamancusa 2024-02-02 20:24:52 UTC
Created attachment 161728 [details] [review]
Bug 35653: (QA follow-up) Perltidy

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Comment 5 Katrin Fischer 2024-03-25 08:54:24 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 6 Fridolin Somers 2024-05-23 08:38:52 UTC
Not backported to 23.11.x