Bug 37920

Summary: writeoff_debts.pl should be logged
Product: Koha Reporter: Andrew Fuerste-Henry <andrew>
Component: Command-line UtilitiesAssignee: Nick Clemens (kidclamp) <nick>
Status: Pushed to stable --- QA Contact: Martin Renvoize (ashimema) <martin.renvoize>
Severity: normal    
Priority: P5 - low CC: martin.renvoize, paul.derscheid, robin, Slodico
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Small patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
25.05.00,24.11.03
Circulation function:
Bug Depends on: 39236    
Bug Blocks:    
Attachments: Bug 37920: Add cronjob loggging to writeoff_debts.pl
Bug 37920: Add cronjob loggging to writeoff_debts.pl
Bug 37920: Add cronjob loggging to writeoff_debts.pl

Description Andrew Fuerste-Henry 2024-09-13 14:32:12 UTC
Runs of the writeoff_debts cron are not logged in the action logs. They should be.
Comment 1 Nick Clemens (kidclamp) 2025-03-04 14:05:52 UTC
*** Bug 38244 has been marked as a duplicate of this bug. ***
Comment 2 Nick Clemens (kidclamp) 2025-03-04 14:06:22 UTC Comment hidden (obsolete)
Comment 3 Magnus Enger 2025-03-11 08:46:22 UTC
Created attachment 179144 [details] [review]
Bug 37920: Add cronjob loggging to writeoff_debts.pl

This patch adds the same logging as other cronjobs have

To test:
1 - Enable system preference CronjobLog
2 - perl misc/cronjobs/writeoff_debts.pl -v -c --added-after 2025-01-01
3 - Check the logs - no entries
4 - Apply patch
5 - Repeat 2
6 - Check the logs, two entries - one for the start and one for the end

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Tested on top of bug 39236. Works as advertised.
Comment 4 Martin Renvoize (ashimema) 2025-03-11 11:05:40 UTC
Created attachment 179156 [details] [review]
Bug 37920: Add cronjob loggging to writeoff_debts.pl

This patch adds the same logging as other cronjobs have

To test:
1 - Enable system preference CronjobLog
2 - perl misc/cronjobs/writeoff_debts.pl -v -c --added-after 2025-01-01
3 - Check the logs - no entries
4 - Apply patch
5 - Repeat 2
6 - Check the logs, two entries - one for the start and one for the end

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Tested on top of bug 39236. Works as advertised.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 5 Katrin Fischer 2025-03-17 07:28:09 UTC
Pushed for 25.05!

Well done everyone, thank you!
Comment 6 Paul Derscheid 2025-03-23 14:09:16 UTC
Nice work everyone!

Pushed to 24.11.x for 24.11.03