https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34077

David Nind <[email protected]> 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 <[email protected]> ---
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.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to