[Bug 39236] New: writeoff_debts.pl does not run
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39236 Bug ID: 39236 Summary: writeoff_debts.pl does not run Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz To recreate: Add a fine to a patron account Run the cronjob: perl misc/cronjobs/writeoff_debts.pl -v -c --added-after 2025-01-01 Attempting to write off 1 debts DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Data truncated for column 'type' at row 1 at /kohadevbox/koha/Koha/Object.pm line 174 Invalid value passed, type=WRITEOFF vim misc/cronjobs/writeoff_debts.pl Edit the cronjob and change the 'WRITEOFF' in the account offset to 'CREATE' perl misc/cronjobs/writeoff_debts.pl -v -c --added-after 2025-01-01 Attempting to write off 1 debts {UNKNOWN}: Can't locate object method "find" via package "Koha::Patrons" (perhaps you forgot to load "Koha::Patrons"?) at /kohadevbox/koha/Koha/Patron/Debarments.pm line 316. at misc/cronjobs/writeoff_debts.pl line 128 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39236 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | Depends on| |31095, 22435 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22435 [Bug 22435] Clarify account_offset types by converting them to clear codes https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31095 [Bug 31095] Remove Koha::Patron::Debarment::GetDebarments and use $patron->restrictions in preference -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39236 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39236 --- Comment #1 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 178916 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=178916&action=edit Bug 39236: writeoff_debts.pl needs adjustments
From bug 22435 - we need to use 'CREATE' as the account_offset type From bug 31095 - we need to 'use Koha::Patrons;'
To test: 1 - Add a fine to a patron account 2 - perl misc/cronjobs/writeoff_debts.pl -v -c --added-after 2025-01-01 3 - Cronjob dies 4 - Apply patch 5 - Rerun 6 - Job succeeds! 7 - Confirm patron's fine is written off 8 - Sign off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39236 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |37920 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37920 [Bug 37920] writeoff_debts.pl should be logged -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39236 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39236 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #178916|0 |1 is obsolete| | --- Comment #2 from Magnus Enger <magnus@libriotech.no> --- Created attachment 179142 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=179142&action=edit Bug 39236: writeoff_debts.pl needs adjustments
From bug 22435 - we need to use 'CREATE' as the account_offset type From bug 31095 - we need to 'use Koha::Patrons;'
To test: 1 - Add a fine to a patron account 2 - perl misc/cronjobs/writeoff_debts.pl -v -c --added-after 2025-01-01 3 - Cronjob dies 4 - Apply patch 5 - Rerun 6 - Job succeeds! 7 - Confirm patron's fine is written off 8 - Sign off Signed-off-by: Magnus Enger <magnus@libriotech.no> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39236 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #179142|0 |1 is obsolete| | --- Comment #3 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 179155 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=179155&action=edit Bug 39236: writeoff_debts.pl needs adjustments
From bug 22435 - we need to use 'CREATE' as the account_offset type From bug 31095 - we need to 'use Koha::Patrons;'
To test: 1 - Add a fine to a patron account 2 - perl misc/cronjobs/writeoff_debts.pl -v -c --added-after 2025-01-01 3 - Cronjob dies 4 - Apply patch 5 - Rerun 6 - Job succeeds! 7 - Confirm patron's fine is written off 8 - Sign off Signed-off-by: Magnus Enger <magnus@libriotech.no> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39236 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Status|Signed Off |Passed QA --- Comment #4 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- I'm confused by how this has been broken for years.. we've been using it in production for a long time and not notices.. maybe strict mode makes the difference Either way, this is a sensible change and causes no regressions. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39236 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39236 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |25.05.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39236 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 25.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39236 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_24_11_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39236 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|25.05.00 |25.05.00,24.11.03 released in| | Status|Pushed to main |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39236 --- Comment #6 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Nice work everyone! Pushed to 24.11.x for 24.11.03 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39236 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.derscheid@lmscloud.de Keywords|rel_24_11_candidate | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39236 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wainuiwitikapark@catalyst.n | |et.nz Status|Pushed to stable |Needs documenting --- Comment #7 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11.x as it wasn't backported to 24.05.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org