[Bug 37645] New: Add ability to batch waive fines
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 Bug ID: 37645 Summary: Add ability to batch waive fines Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Fines and fees Assignee: koha-bugs@lists.koha-community.org Reporter: enica@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org It would be nice if there's an ability in Koha to waive fines/fees in a batch. This is part of a regular workflow for libraries, especially those who regularly purge patron accounts. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |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=37645 Katie Bliss <kebliss@dmpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kebliss@dmpl.org --- Comment #1 from Katie Bliss <kebliss@dmpl.org> --- +1 -- 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=37645 George Williams (NEKLS) <george@nekls.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |george@nekls.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 Rebecca Coert <rcoert@arlingtonva.us> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rcoert@arlingtonva.us --- Comment #2 from Rebecca Coert <rcoert@arlingtonva.us> --- If it existed, I would definitely use this function! This would make our semi-annual patron cleanup faster and more efficient. -- 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=37645 hebah@bywatersolutions.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hebah@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 Michelle Spinney <mspinney@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mspinney@clamsnet.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 karie.straube@yavapaiaz.gov changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |karie.straube@yavapaiaz.gov --- Comment #3 from karie.straube@yavapaiaz.gov --- My consortium also needs this functionality! -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |blawlor@clamsnet.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 Brandon <brandon@wwcrld.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |brandon@wwcrld.org --- Comment #4 from Brandon <brandon@wwcrld.org> --- +1 We would also use this feature multiple times a year. -- 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=37645 Laura O'Neil <laura@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |laura@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 Mollie Myers <mmyers@eulesstx.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mmyers@eulesstx.gov --- Comment #5 from Mollie Myers <mmyers@eulesstx.gov> --- If this existed I would LOVE to have this function as I've finally gotten clearance to clear out old accounts with or without charges past a certain date. We would use this feature once a year, I believe, but having the ability to do it ourselves vs. sending in a ticket to ByWater every year would be preferred. Thank you! -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 saylett <saylett@spanishfork.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |saylett@spanishfork.org --- Comment #6 from saylett <saylett@spanishfork.org> --- We would also use this if available. We recently change dour policy to waive fines/fees that are older than 5 years, and have over 2,500 accounts that are eligible for fines/fees to be waived but we have to review them individually. Also, we're going to start deleting accounts that have been expired for more than 5 years, so this functionality would also be helpful for that process. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 Catrina Berka <catrina@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |catrina@bywatersolutions.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 carthur@slolibrary.org <carthur@slolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |carthur@slolibrary.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 --- Comment #7 from carthur@slolibrary.org <carthur@slolibrary.org> --- +1 -- 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=37645 Chip Halvorsen <Chip.Halvorsen@WestlakeLibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Chip.Halvorsen@WestlakeLibr | |ary.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 Elizabeth Hoffman <ehoffman@plumcreeklibrary.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ehoffman@plumcreeklibrary.n | |et -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 Kris <kbecker@jcls.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kbecker@jcls.org --- Comment #8 from Kris <kbecker@jcls.org> --- We would love this for our yearly expired patron purge. -- 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=37645 Todd Goatley <tgoatley@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tgoatley@gmail.com --- Comment #9 from Todd Goatley <tgoatley@gmail.com> --- +1 -- 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=37645 Amy Muchmore <amuchmore@dubuque.lib.ia.us> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |amuchmore@dubuque.lib.ia.us --- Comment #10 from Amy Muchmore <amuchmore@dubuque.lib.ia.us> --- Our library would love this for our yearly expired patron purge -- 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=37645 Rebecca Leifker <rleifker@carnegiestout.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rleifker@carnegiestout.org --- Comment #11 from Rebecca Leifker <rleifker@carnegiestout.org> --- This feature would be very helpful with the yearly patron purge. -- 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=37645 --- Comment #12 from Chip Halvorsen <Chip.Halvorsen@WestlakeLibrary.org> --- +1 We have a policy to do an annual writeoff of bills more than 7 years old. It would be nice to have options similar to "Batch patron deletion and anonymization," with selections similar to those used by the cronjob writeoff_debts.pl -- 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=37645 Jason Robb <jrobb@sekls.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jrobb@sekls.org --- Comment #13 from Jason Robb <jrobb@sekls.org> --- +1 -- 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=37645 Sally Lodico <Slodico@knoxlib.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Slodico@knoxlib.org --- Comment #14 from Sally Lodico <Slodico@knoxlib.org> --- There's a cron job to write off old fines (not waive). We've had it scheduled for a couple of years to run on the 1st of every month, writing off fines that are 84 months (7 years) or more years old. We had a couple of hick-ups getting it rolling, but it's been running smoothly for at least a year now. /misc/cronjobs/writeoff_debts.pl I had ByWater clear the first batch of old accounts before we scheduled the cron to run regularly due to the very large number of old bills we had in the system, but haven't needed to go back to them for data services since then. The cronjob handles it for us. -- 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=37645 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Laura.escamilla@bywatersolu | |tions.com Assignee|koha-bugs@lists.koha-commun |Laura.escamilla@bywatersolu |ity.org |tions.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 Sonia Bouis <sonia.bouis@univ-lyon3.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sonia.bouis@univ-lyon3.fr --- Comment #15 from Sonia Bouis <sonia.bouis@univ-lyon3.fr> --- +1 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 Mathieu Saby <mathsabypro@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mathsabypro@gmail.com --- Comment #16 from Mathieu Saby <mathsabypro@gmail.com> --- We may be interested, but I see the status is "assigned" to Laura Escamilla. Does that mean that Bywaters is already planning a patch for that ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |caroline.cyr-la-rose@inlibr | |o.com --- Comment #17 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- I've had someone ask for this recently. They have to clear the writeoffs with the board of administrators every year so it cannot be an automated cron job. For now they'll open a ticket every year to ask us to run the script, but it would be great if they were independent in doing this. They would need something like a report on what WOULD be written off (number of transactions + amount), so an option of a dry run with report. Then an actual run. They haven't mentioned if they need to exclude certain types of transactions, but I assume a staff interface tool would include all the possible options from the existing script. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 Melissa <mwalker@akronlibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mwalker@akronlibrary.org --- Comment #18 from Melissa <mwalker@akronlibrary.org> --- This would be incredibly helpful! I just put in a huge request to the data team to batch waive fines. I'm going to have to make that request regularly when we go to clean up patron data or when juveniles age up to 18. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 zoho.roboto@bywatersolutions.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |zoho.roboto@bywatersolution | |s.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 mteal@greenvillelibrary.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mteal@greenvillelibrary.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 nicole@hchlibrary.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nicole@hchlibrary.org --- Comment #19 from nicole@hchlibrary.org --- Would love to see this developed. It would make our workflow so much more efficient when batch deleting expired patrons that still owe money. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 trevor.diamond@mainlib.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |trevor.diamond@mainlib.org --- Comment #20 from trevor.diamond@mainlib.org --- +1 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 --- Comment #21 from mteal@greenvillelibrary.org --- It would be nice to be able have a note for these waived fines that says something like "Aged out fines 9/4/26" to easily see why the transaction was waived. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 --- Comment #22 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to mteal from comment #21)
It would be nice to be able have a note for these waived fines that says something like "Aged out fines 9/4/26" to easily see why the transaction was waived.
Please keep in mind that note should be configurable or at least translatable and follow DateFormat system preference. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 --- Comment #23 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Created attachment 205256 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205256&action=edit Bug 37645: Add batch writeoff filters and staff tool navigation Test plan: 1. Apply the patches and run the database update. 2. Grant a staff user: - tools > batch_writeoff - updatecharges > writeoff 3. Confirm “Batch writeoff” appears under Tools. 4. Create test data for at least two patrons. If possible, use patrons in different patron categories and create charges at different libraries. Create the following charges: Patron A: - A manual fee (for example, New card fee), with an outstanding balance. - A LOST charge, with an outstanding balance. - A returned OVERDUE fine, with an outstanding balance. Patron B: - A manual fee with an outstanding balance, using a different patron category and/or branch from Patron A. Also create an accruing OVERDUE fine: - Check an item out to a test patron. - Make the item overdue and generate an overdue fine. - Leave the item checked out so that the account line has: debit_type_code = OVERDUE status = UNRETURNED - Do not return the item before testing the batch writeoff. If practical, also leave one fully paid charge on a test patron for comparison. 5. Open Tools > Batch writeoff and confirm filtering is available by: - Created after - Created before - Patron category - Debit type - Branch - Account line ID 6. With no filters selected, click Preview and confirm the tool requires at least one filter. 7. Test the filters individually using the test charges: - Debit type returns only charges of the selected debit type. - Patron category returns only charges belonging to patrons in that category. - Branch returns only charges created for that branch. - Created after excludes older charges. - Created before excludes newer charges. - Account line ID returns the specified eligible charge. 8. Test a combination of filters and confirm only charges matching all selected criteria are returned. 9. Confirm eligible outstanding debts are included in the preview. 10. Confirm the accruing OVERDUE fine with status UNRETURNED is NOT included in the preview. 11. If a fully paid charge was created, confirm it is NOT included in the preview. 12. Select one or more eligible charges and submit the batch writeoff. 13. Confirm a background job is created. 14. Confirm the background job finishes successfully and reports the account lines that were written off. 15. Confirm each original debit that was written off has: - amountoutstanding = 0 - status = FORGIVEN 16. Confirm a WRITEOFF credit and APPLY offset are created for each successful writeoff. 17. Confirm the accruing OVERDUE fine remains unchanged and outstanding. 18. Confirm duplicate active submissions for the same staff user, branch, and account-line set do not create stacked background jobs. 19. Run a report that returns an accountlines_id column. 20. Confirm Batch operations > Batch writeoff is available in the report results. 21. Send the report results to Batch writeoff and confirm the visible account line IDs are loaded into the tool and eligible lines can be previewed and submitted. 22. Confirm misc/cronjobs/writeoff_debts.pl continues to work using the shared writeoff routines. Automated tests: prove -v t/db_dependent/Koha/Account/Line.t prove -v t/db_dependent/Koha/Account/Lines.t prove -v t/db_dependent/Koha/BackgroundJob/BatchWriteoff.t All tests pass. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #205256|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 --- Comment #24 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Created attachment 205257 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205257&action=edit Bug 37645: Add reusable methods for writing off debts -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 --- Comment #25 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Created attachment 205258 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205258&action=edit Bug 37645: Add batch writeoff staff tool -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 --- Comment #26 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Created attachment 205259 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205259&action=edit Bug 37645: Add batch writeoff filters and staff tool navigation Test plan: 1. Apply the patches and run the database update. 2. Grant a staff user: - tools > batch_writeoff - updatecharges > writeoff 3. Confirm “Batch writeoff” appears under Tools. 4. Create test data for at least two patrons. If possible, use patrons in different patron categories and create charges at different libraries. Create the following charges: Patron A: - A manual fee (for example, New card fee), with an outstanding balance. - A LOST charge, with an outstanding balance. - A returned OVERDUE fine, with an outstanding balance. Patron B: - A manual fee with an outstanding balance, using a different patron category and/or branch from Patron A. Also create an accruing OVERDUE fine: - Check an item out to a test patron. - Make the item overdue and generate an overdue fine. - Leave the item checked out so that the account line has: debit_type_code = OVERDUE status = UNRETURNED - Do not return the item before testing the batch writeoff. If practical, also leave one fully paid charge on a test patron for comparison. 5. Open Tools > Batch writeoff and confirm filtering is available by: - Created after - Created before - Patron category - Debit type - Branch - Account line ID 6. With no filters selected, click Preview and confirm the tool requires at least one filter. 7. Test the filters individually using the test charges: - Debit type returns only charges of the selected debit type. - Patron category returns only charges belonging to patrons in that category. - Branch returns only charges created for that branch. - Created after excludes older charges. - Created before excludes newer charges. - Account line ID returns the specified eligible charge. 8. Test a combination of filters and confirm only charges matching all selected criteria are returned. 9. Confirm eligible outstanding debts are included in the preview. 10. Confirm the accruing OVERDUE fine with status UNRETURNED is NOT included in the preview. 11. If a fully paid charge was created, confirm it is NOT included in the preview. 12. Select one or more eligible charges and submit the batch writeoff. 13. Confirm a background job is created. 14. Confirm the background job finishes successfully and reports the account lines that were written off. 15. Confirm each original debit that was written off has: - amountoutstanding = 0 - status = FORGIVEN 16. Confirm a WRITEOFF credit and APPLY offset are created for each successful writeoff. 17. Confirm the accruing OVERDUE fine remains unchanged and outstanding. 18. Confirm duplicate active submissions for the same staff user, branch, and account-line set do not create stacked background jobs. 19. Run a report that returns an accountlines_id column. 20. Confirm Batch operations > Batch writeoff is available in the report results. 21. Send the report results to Batch writeoff and confirm the visible account line IDs are loaded into the tool and eligible lines can be previewed and submitted. 22. Confirm misc/cronjobs/writeoff_debts.pl continues to work using the shared writeoff routines. Automated tests: prove -v t/db_dependent/Koha/Account/Line.t prove -v t/db_dependent/Koha/Account/Lines.t prove -v t/db_dependent/Koha/BackgroundJob/BatchWriteoff.t All tests pass. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #205257|0 |1 is obsolete| | Attachment #205258|0 |1 is obsolete| | Attachment #205259|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 --- Comment #27 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Created attachment 205261 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205261&action=edit Bug 37645: Add reusable methods for writing off debts -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 --- Comment #28 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Created attachment 205262 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205262&action=edit Bug 37645: Add batch writeoff staff tool -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 --- Comment #29 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Created attachment 205263 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205263&action=edit Bug 37645: Add batch writeoff filters and staff tool navigation Test plan: 1. Apply the patches and run the database update. 2. Grant a staff user: - tools > batch_writeoff - updatecharges > writeoff 3. Confirm “Batch writeoff” appears under Tools. 4. Create test data for at least two patrons. If possible, use patrons in different patron categories and create charges at different libraries. Create the following charges: Patron A: - A manual fee (for example, New card fee), with an outstanding balance. - A LOST charge, with an outstanding balance. - A returned OVERDUE fine, with an outstanding balance. Patron B: - A manual fee with an outstanding balance, using a different patron category and/or branch from Patron A. Also create an accruing OVERDUE fine: - Check an item out to a test patron. - Make the item overdue and generate an overdue fine. - Leave the item checked out so that the account line has: debit_type_code = OVERDUE status = UNRETURNED - Do not return the item before testing the batch writeoff. If practical, also leave one fully paid charge on a test patron for comparison. 5. Open Tools > Batch writeoff and confirm filtering is available by: - Created after - Created before - Patron category - Debit type - Branch - Account line ID 6. With no filters selected, click Preview and confirm the tool requires at least one filter. 7. Test the filters individually using the test charges: - Debit type returns only charges of the selected debit type. - Patron category returns only charges belonging to patrons in that category. - Branch returns only charges created for that branch. - Created after excludes older charges. - Created before excludes newer charges. - Account line ID returns the specified eligible charge. 8. Test a combination of filters and confirm only charges matching all selected criteria are returned. 9. Confirm eligible outstanding debts are included in the preview. 10. Confirm the accruing OVERDUE fine with status UNRETURNED is NOT included in the preview. 11. If a fully paid charge was created, confirm it is NOT included in the preview. 12. Select one or more eligible charges and submit the batch writeoff. 13. Confirm a background job is created. 14. Confirm the background job finishes successfully and reports the account lines that were written off. 15. Confirm each original debit that was written off has: - amountoutstanding = 0 - status = FORGIVEN 16. Confirm a WRITEOFF credit and APPLY offset are created for each successful writeoff. 17. Confirm the accruing OVERDUE fine remains unchanged and outstanding. 18. Confirm duplicate active submissions for the same staff user, branch, and account-line set do not create stacked background jobs. 19. Run a report that returns an accountlines_id column. 20. Confirm Batch operations > Batch writeoff is available in the report results. 21. Send the report results to Batch writeoff and confirm the visible account line IDs are loaded into the tool and eligible lines can be previewed and submitted. 22. Confirm misc/cronjobs/writeoff_debts.pl continues to work using the shared writeoff routines. Automated tests: prove -v t/db_dependent/Koha/Account/Line.t prove -v t/db_dependent/Koha/Account/Lines.t prove -v t/db_dependent/Koha/BackgroundJob/BatchWriteoff.t All tests pass. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 --- Comment #30 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 205264 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205264&action=edit Bug 37645: (follow-up) Add new permission to Permissions.t Patch from commit c798037 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #31 from Owen Leonard <oleonard@myacpl.org> --- QA tool is reporting this: # Failed test 'Expected permissions generated for superlibrarian' # at /kohadevbox/koha/t/Koha/Auth/Permissions.t line 315. # Structures begin differing at: # $got->{CAN_user_tools_batch_writeoff} = Does not exist # $expected->{CAN_user_tools_batch_writeoff} = '1' # Looks like you failed 1 test of 1. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #32 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- (In reply to Owen Leonard from comment #31)
QA tool is reporting this:
# Failed test 'Expected permissions generated for superlibrarian' # at /kohadevbox/koha/t/Koha/Auth/Permissions.t line 315. # Structures begin differing at: # $got->{CAN_user_tools_batch_writeoff} = Does not exist # $expected->{CAN_user_tools_batch_writeoff} = '1' # Looks like you failed 1 test of 1.
I cannot recreate this. Is it possible you ran the QA tools before updatedatabase? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 --- Comment #33 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- I tested this locally by deleting the batch_writeoff permission row, running updatedatabase, and then rerunning t/Koha/Auth/Permissions.t. The atomic update recreated the permission successfully and the test passed. Could you check whether your test database has applied the atomic update? You can verify with: SELECT module_bit, code, description FROM permissions WHERE code = 'batch_writeoff'; If the row is missing, running updatedatabase should add it. After that, prove -v t/Koha/Auth/Permissions.t should pass. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #34 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- I get an error when filtering debits by both category and branch: DBI Exception: DBD::mysql::st execute failed: Column 'branchcode' in WHERE is ambiguous at /usr/share/perl5/Exception/Class/Base.pm line 88 The date filters are comparing the user-selected date to the datetime value in accountlines.date. This causes the Created After value to be inclusive of the date chosen but the Created Before value to exclude the date chosen. My preference here would be: - compare the user-selected date to only the date portion of accountlines.date - update the comparisons in search_for_writeoff to be >= and <= - reword the UI labels to read "Created on or after" and "Created on or before" The Tools sidebar isn't shown while in the Batch writeoff tool and Batch writeoff doesn't appear in the sidebar while using other tools. All of my attempts to writeoff resulted in background jobs that fail. Logs show: [2026/09/09 14:18:26] [WARN] Uncaught exception processing job id=55: Exception 'Koha::Exception' thrown 'batch_writeoff is not a valid job_type' main::catch {...} /kohadevbox/koha/misc/workers/background_jobs_worker.pl (235) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 --- Comment #35 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Created attachment 205387 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205387&action=edit Bug 37645: (follow-up) Address QA feedback for batch writeoff tool -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 --- Comment #36 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Thanks for testing! I've pushed a follow-up addressing the issues you found: --Fixed the ambiguous branchcode when branch and patron category filters are used together. --Changed the date filters to compare against the date portion of the account line date and made the boundaries inclusive. --Updated the labels to “Created on or after” and “Created on or before.” --Added Batch writeoff to the Tools sidebar and added the sidebar to the Batch writeoff page. --Added regression coverage for the combined category/branch filters and date behavior. I also reproduced the background job issue. The batch_writeoff job type was correctly registered, but my long_tasks worker was still running with the previous code loaded. After restarting that worker, a new Batch writeoff job completed successfully (1/1). The focused account line and background job tests are passing, and git diff --check is clean. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 --- Comment #37 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Two small things: Step 15 - The lost item fee I wrote off received status "Returned" rather than "Forgiven." That doesn't seem correct. Step 18 - While Koha does not enqueue a duplicate job, it still tells the user "The batch writeoff job has been enqueued." It would be more clear and accurate to tell the user that no new job was created. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 --- Comment #38 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- (In reply to Andrew Fuerste-Henry from comment #37)
Two small things: Step 15 - The lost item fee I wrote off received status "Returned" rather than "Forgiven." That doesn't seem correct.
On further testing, I was incorrect here. The LOST fee is marked Forgiven when waived and later updates to Found if the item is checked in or checked out. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 --- Comment #39 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Created attachment 205650 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205650&action=edit Bug 37645: Clarify duplicate batch writeoff jobs Addressed the remaining feedback from comment 37/38. Duplicate active batch writeoff submissions are still prevented from creating another background job, but the staff interface now explicitly reports that a matching job is already queued and that no new job was created, with a link to the existing job. Added test coverage for the duplicate indicator as well. Focused tests and git diff --check pass. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #205261|0 |1 is obsolete| | Attachment #205262|0 |1 is obsolete| | Attachment #205263|0 |1 is obsolete| | Attachment #205264|0 |1 is obsolete| | Attachment #205387|0 |1 is obsolete| | Attachment #205650|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 --- Comment #40 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 205774 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205774&action=edit Bug 37645: Add reusable methods for writing off debts Signed-off-by: Marisha Sullivan <msullivan@holdenfg.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 --- Comment #41 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 205775 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205775&action=edit Bug 37645: Add batch writeoff staff tool Signed-off-by: Marisha Sullivan <msullivan@holdenfg.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 --- Comment #42 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 205776 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205776&action=edit Bug 37645: Add batch writeoff filters and staff tool navigation Test plan: 1. Apply the patches and run the database update. 2. Grant a staff user: - tools > batch_writeoff - updatecharges > writeoff 3. Confirm “Batch writeoff” appears under Tools. 4. Create test data for at least two patrons. If possible, use patrons in different patron categories and create charges at different libraries. Create the following charges: Patron A: - A manual fee (for example, New card fee), with an outstanding balance. - A LOST charge, with an outstanding balance. - A returned OVERDUE fine, with an outstanding balance. Patron B: - A manual fee with an outstanding balance, using a different patron category and/or branch from Patron A. Also create an accruing OVERDUE fine: - Check an item out to a test patron. - Make the item overdue and generate an overdue fine. - Leave the item checked out so that the account line has: debit_type_code = OVERDUE status = UNRETURNED - Do not return the item before testing the batch writeoff. If practical, also leave one fully paid charge on a test patron for comparison. 5. Open Tools > Batch writeoff and confirm filtering is available by: - Created after - Created before - Patron category - Debit type - Branch - Account line ID 6. With no filters selected, click Preview and confirm the tool requires at least one filter. 7. Test the filters individually using the test charges: - Debit type returns only charges of the selected debit type. - Patron category returns only charges belonging to patrons in that category. - Branch returns only charges created for that branch. - Created after excludes older charges. - Created before excludes newer charges. - Account line ID returns the specified eligible charge. 8. Test a combination of filters and confirm only charges matching all selected criteria are returned. 9. Confirm eligible outstanding debts are included in the preview. 10. Confirm the accruing OVERDUE fine with status UNRETURNED is NOT included in the preview. 11. If a fully paid charge was created, confirm it is NOT included in the preview. 12. Select one or more eligible charges and submit the batch writeoff. 13. Confirm a background job is created. 14. Confirm the background job finishes successfully and reports the account lines that were written off. 15. Confirm each original debit that was written off has: - amountoutstanding = 0 - status = FORGIVEN 16. Confirm a WRITEOFF credit and APPLY offset are created for each successful writeoff. 17. Confirm the accruing OVERDUE fine remains unchanged and outstanding. 18. Confirm duplicate active submissions for the same staff user, branch, and account-line set do not create stacked background jobs. 19. Run a report that returns an accountlines_id column. 20. Confirm Batch operations > Batch writeoff is available in the report results. 21. Send the report results to Batch writeoff and confirm the visible account line IDs are loaded into the tool and eligible lines can be previewed and submitted. 22. Confirm misc/cronjobs/writeoff_debts.pl continues to work using the shared writeoff routines. Automated tests: prove -v t/db_dependent/Koha/Account/Line.t prove -v t/db_dependent/Koha/Account/Lines.t prove -v t/db_dependent/Koha/BackgroundJob/BatchWriteoff.t All tests pass. Signed-off-by: Marisha Sullivan <msullivan@holdenfg.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 --- Comment #43 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 205777 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205777&action=edit Bug 37645: (follow-up) Add new permission to Permissions.t Signed-off-by: Marisha Sullivan <msullivan@holdenfg.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 --- Comment #44 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 205778 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205778&action=edit Bug 37645: (follow-up) Address QA feedback for batch writeoff tool Signed-off-by: Marisha Sullivan <msullivan@holdenfg.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 --- Comment #45 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 205779 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205779&action=edit Bug 37645: Clarify duplicate batch writeoff jobs Addressed the remaining feedback from comment 37/38. Duplicate active batch writeoff submissions are still prevented from creating another background job, but the staff interface now explicitly reports that a matching job is already queued and that no new job was created, with a link to the existing job. Added test coverage for the duplicate indicator as well. Focused tests and git diff --check pass. Signed-off-by: Marisha Sullivan <msullivan@holdenfg.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37645 snewell@hmcpl.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |snewell@hmcpl.org -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org