Bug 35653 - Allow the patron import script to log it's output to the action_logs cron logging
Summary: Allow the patron import script to log it's output to the action_logs cron log...
Status: Needs documenting
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Lucas Gass (lukeg)
QA Contact: Emily Lamancusa (emlam)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-26 22:09 UTC by Liz Rea
Modified: 2024-05-23 08:38 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.05.00
Circulation function:


Attachments
Bug 35653: Log import_patroni.pl info to action logs (2.59 KB, patch)
2023-12-27 17:39 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 35653: Log import_patroni.pl info to action logs (2.64 KB, patch)
2023-12-31 20:57 UTC, David Nind
Details | Diff | Splinter Review
Bug 35653: Log import_patroni.pl info to action logs (2.71 KB, patch)
2024-02-02 20:24 UTC, Emily Lamancusa (emlam)
Details | Diff | Splinter Review
Bug 35653: (QA follow-up) Perltidy (2.23 KB, patch)
2024-02-02 20:24 UTC, Emily Lamancusa (emlam)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 (lukeg) 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 (emlam) 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 (emlam) 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