[Bug 34077] New: writeoff_debts without --confirm doesn't show which accountline records it would have been written off
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34077 Bug ID: 34077 Summary: writeoff_debts without --confirm doesn't show which accountline records it would have been written off Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: caroline.cyr-la-rose@inlibro.com QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz The documentation in writeoff_debts says that if we omit --confirm, "the script will only report on the accountline records it would have been written off". However, while testing bug 28995, I tried to see which accountline would be written off, and omitting the --confirm flag only shows the help. I ran ./misc/cronjobs/writeoff_debts.pl --added-after 2023-06-20 and it showed the help. When I ran ./misc/cronjobs/writeoff_debts.pl --added-after 2023-06-20 --confirm it wrote off the charge correctly. -- 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=34077 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=28995 -- 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=34077 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |27049 CC| |martin.renvoize@ptfs-europe | |.com Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27049 [Bug 27049] Add a script to bulk writeoff debts -- 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=34077 --- Comment #1 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 157230 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=157230&action=edit Bug 34077: Update output to match POD This patch adds a check on !$confirm such that we enable verbose output should the confirm flag not be passed. This adheres with what the documentation already states. -- 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=34077 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Severity|enhancement |minor Assignee|koha-bugs@lists.koha-commun |martin.renvoize@ptfs-europe |ity.org |.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=34077 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #2 from David Nind <david@davidnind.com> --- I had a go at testing. Just to clarify, in case I got something wrong: 1. With --confirm it should do what it is supposed to do (it did for me) 2. Without --confirm it should show what it would change (this didn't work as expected for me - see 3 and 4) 3. Without --confirm and with only one option, the help is shown, for example: ./misc/cronjobs/writeoff_debts.pl --added-after 2023-06-20 4. Without --confirm with two or more options, it will show what would change, for example: ./misc/cronjobs/writeoff_debts.pl --added-after 2023-06-20 -v This is after the patch was applied and transactions set up and date of one transaction changed to earlier. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34077 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #3 from David Nind <david@davidnind.com> --- Changing status to Failed QA - see comment#2 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34077 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |28995 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28995 [Bug 28995] Add --added_after to writeoff_debts.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34077 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #157230|0 |1 is obsolete| | --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 159598 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159598&action=edit Bug 34077: Update output to match POD This patch adds a check on !$confirm such that we enable verbose output should the confirm flag not be passed. This adheres with what the documentation already states. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34077 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- The logic was flawed, thanks for testing David. I've corrected it now, and also added a little extra detail into the output as it was missing some of the more recently added parameters. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34077 --- Comment #6 from David Nind <david@davidnind.com> --- I'm now getting an error when I confirm. Am I testing this correctly? ./misc/cronjobs/writeoff_debts.pl --added_after 2023-12-04 --category-code PT --confirm 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 170 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 170 or ./misc/cronjobs/writeoff_debts.pl --added_after 2023-12-04 --confirm 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 170 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 170 This is the test plan I used: 1. Add two fees in a patron account (I used Mary Burton, borrower number = 49): 1.1. Go into a patron record > Accounting tab 1.2. Go to the Create a manual invoice tab 1.3. Fill out the form (use manual fee) 1.4. Click 'Save' 1.5. Redo steps 1.2 to 1.4 to add a second fee 2. Manually change the date for one transaction in the database: 2.1. There should be two transactions in the accountlines and account_offsets tables (koha-mysql kohadev + select * from accountlines; + select * from account_offsets;) 2.2. Update the date for one of the fees using the accountlines_id: update accountlines set date = '2023-06-01 09:34:05' where accountlines_id = 1; update account_offsets set created_on = '2023-06-01 09:34:05' where debit_id = '1'; => If you look at the patron record in the staff interface, you should now have two fees with different date: one fee on 1 June 2023 and one with today's date (the account_offset is also modified - not sure if that last part is necessary). 3. Run writeoff_debts.pl with various options to make sure it works as expected (to use --added_after, the date should be after the first fee but before the second): 3.1. Without any options it should return the help: ./misc/cronjobs/writeoff_debts.pl 3.2. Without --confirm and one option it should show what it would change: ./misc/cronjobs/writeoff_debts.pl --added_after 2023-12-04 ==> With --confirm we would write off 1 debts added after 2023-12-04 Accountline 2 will be written of 3.3. Without --confirm and with two or more options - it should show what it would change: ./misc/cronjobs/writeoff_debts.pl --added-after 2023-06-20 --category-code PT ==> With --confirm we would write off 1 debts of type MANUAL added after 2023-06-20 Accountline 2 will be written off 3.4. With --confirm it should correctly write off one amount: ./misc/cronjobs/writeoff_debts.pl --added_after 2023-12-04 --confirm 4. Check the patron record ==> The fee with the date after should be written off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34077 Bug 34077 depends on bug 28995, which changed state. Bug 28995 Summary: Add --added_after to writeoff_debts.pl https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28995 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34077 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.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=34077 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #159598|0 |1 is obsolete| | --- Comment #7 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- Created attachment 159987 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159987&action=edit Bug 34077: Update output to match POD This patch adds a check on !$confirm such that we enable verbose output should the confirm flag not be passed. This adheres with what the documentation already states. Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34077 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |julian.maurice@biblibre.com |y.org | CC| |julian.maurice@biblibre.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34077 --- Comment #8 from Julian Maurice <julian.maurice@biblibre.com> --- This causes a small usability issue IMO: `writeoff_debts.pl` and `writeoff_debts.pl -v` have the same verbosity level, but `writeoff_debts.pl -c` and `writeoff_debts.pl -c -v` have different verbosity level One might run `writeoff_debts.pl` first, be happy with the output and just add -c to confirm, only to be disappointed that there is no output now. What about doing the opposite ? Instead of updating the script to match the POD, update the POD to match the script behavior and say that -v is required if -c is absent ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34077 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl Status|Signed Off |Failed QA --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Needs feedback. Previous comment sounds good to me. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34077 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #159987|0 |1 is obsolete| | --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 161772 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=161772&action=edit Bug 34077: Update output to match POD This patch adds a check on !$confirm such that we enable verbose output should the confirm flag not be passed. This adheres with what the documentation already states. Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34077 --- Comment #11 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 161773 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=161773&action=edit Bug 34077: Only print verbose output when asked for This patch updates the logic such that we only trigger verbose when verbose is explicitly asked for. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34077 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34077 --- Comment #12 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Follow up added to take account of Julians comment.. He's right.. we should really only output verbose if it's specifically asked for. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34077 --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 161774 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=161774&action=edit Bug 34077: Tidy the script Minimal changes were needed to bring the script up to date with current perltidy requirements. I opted to do a full tidy rather than just tidy the blocks changed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34077 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |35074 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35074 [Bug 35074] Add --patron_category to writeoff_debts.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34077 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=35996 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34077 --- Comment #14 from Julian Maurice <julian.maurice@biblibre.com> --- With the followup we can now execute the script without -v nor -c, which prints nothing and does nothing. Not only useless, it may also give the impression that something has been done without errors. Failing QA for that. I think the current behavior in master is ok (-v is required if -c is absent) and only the documentation needs to be fixed. On the other hand, requiring a "verbose" flag is unusual for a CLI. So maybe one of the following alternatives is better (or both): - Set default verbosity to 1, and add a `-q, --quiet` flag to decrease verbosity - Add a `-n, --dry-run` flag and require exclusively one of -n or -c (maybe best in an another bug report ?) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34077 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34077 --- Comment #15 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I'm out, this was meant to be a simple consistency fix -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34077 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|julian.maurice@biblibre.com |testopia@bugs.koha-communit | |y.org Assignee|martin.renvoize@ptfs-europe |julian.maurice@biblibre.com |.com | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34077 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #161772|0 |1 is obsolete| | Attachment #161773|0 |1 is obsolete| | Attachment #161774|0 |1 is obsolete| | --- Comment #16 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 162234 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162234&action=edit Bug 34077: Improve documentation and error messages of writeoff_debts.pl * Change the SYNOPSIS to better describe the different ways to use the script * Only show the SYNOPSIS when options used are wrong (unknown option, no filter options, or neither -c nor -v) * Show the options details only with --help * Clarify the fact that -v is required when -c is not supplied in the description of both options * Print a specific error message for the following cases: * no filters options * neither -c nor -v was supplied -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34077 --- Comment #17 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 162235 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162235&action=edit Bug 34077: Allow to use --category-code as the only filter option --category-code was not checked in the "at least one filter option" check but it is clearly a filter option. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34077 Julian Maurice <julian.maurice@biblibre.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=34077 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |philippe.blouin@inlibro.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34077 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #162234|0 |1 is obsolete| | --- Comment #18 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 167403 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=167403&action=edit Bug 34077: Improve documentation and error messages of writeoff_debts.pl * Change the SYNOPSIS to better describe the different ways to use the script * Only show the SYNOPSIS when options used are wrong (unknown option, no filter options, or neither -c nor -v) * Show the options details only with --help * Clarify the fact that -v is required when -c is not supplied in the description of both options * Print a specific error message for the following cases: * no filters options * neither -c nor -v was supplied 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=34077 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #162235|0 |1 is obsolete| | --- Comment #19 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 167404 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=167404&action=edit Bug 34077: Allow to use --category-code as the only filter option --category-code was not checked in the "at least one filter option" check but it is clearly a filter option. 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=34077 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com --- Comment #20 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Thanks for taking over here Julian.. I was a bit burnt out. I appreciate the help. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34077 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34077 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |24.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34077 --- Comment #21 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Thanks for all the hard work! Pushed to main for the next 24.11.00 release as RM Assistant -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34077 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Version(s)|24.11.00 |24.11.00,24.05.02 released in| | Status|Pushed to main |Pushed to stable --- Comment #22 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 24.05.x for upcoming 24.05.02 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34077 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|24.11.00,24.05.02 |24.11.00,24.05.02,23.11.07 released in| | Status|Pushed to stable |Pushed to oldstable CC| |fridolin.somers@biblibre.co | |m --- Comment #23 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.11.x for 23.11.07 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34077 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|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=34077 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This fixes the release notes| |misc/cronjobs/writeoff_debt | |s.pl and updates the help. | |If the --confirm option was | |not used it was showing the | |help, instead of showing | |the accountline records | |that would be written off. | |Fixes to the script, and | |updates to improve the help | |and error messages include: | |- improving the help for | |the usage and options (it | |should now be easier to | |understand how to use the | |script) | |- only showing the | |usage summary when the | |wrong options are used | |(unknown option, no filter | |options, or no --confirm or | |--verbose) | |- clarifying the | |help for the --verbose and | |--confirm options | |(--verbose is required if | |--confirm is not used) | |- | |showing an error message | |when no filter options are | |used, and when no --confirm | |or --verbose option is used | |- the --category-code | |option requires another | |filter option --- Comment #24 from David Nind <david@davidnind.com> --- Apologies for bringing this one up again! I was trying to write a release note and was testing the script. I don't think the script is working as it should: 1. I couldn't get it to work when using the --confirm option. 2. Using the --category-code option - which one is it?: - The second patch title says "Allow to use --category-code as the only filter option" - The help text says: . Please note that --category-code must be accompanied by another filter - the script will not run if this is the only filter provided. . This option cannot be used alone, it must be combined with another filter. Maybe another change has affected this one? If not, I'll create another bug. 1. Add three manual fees to a patron's account with a patron category of PT. 2. Run the script with these options (all the options I tried with --verbose work as expected): - misc/cronjobs/writeoff_debts.pl --verbose --category-code=PT - misc/cronjobs/writeoff_debts.pl --verbose --type=MANUAL - misc/cronjobs/writeoff_debts.pl --verbose --category-code=PT --added-before=2024-08-02 - misc/cronjobs/writeoff_debts.pl --verbose --category-code=PT --added-after=2024-07-01 Results: You get a message similar to this showing what will happen (this is for --category-code=PT --verbose) Attempting to write off 3 debts Accountline 1 will be written off Accountline 2 will be written off Accountline 3 will be written off 3. Run the script examples in step 2 again with the --confirm option instead of the --verbose option. This doesn't work as expected for any combination I tried, and you get output similar to this: misc/cronjobs/writeoff_debts.pl --confirm --category-code=PT --added-before=2024-08-02 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 172 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 172 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34077 --- Comment #25 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- It looks like some data is "too long" for a field it#s being moved to. Wondering if you tested on a new database or if there might be any weird data from testbuilder around? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34077 wainuiwitikapark@catalyst.net.nz changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #26 from wainuiwitikapark@catalyst.net.nz --- Not backporting to 23.05.x unless requested -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34077 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |RESOLVED Resolution|--- |FIXED --- Comment #27 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org