[Koha-bugs] [Bug 25683] update_patron_categories.pl should recognize no fine history = 0 outstanding fines

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jun 10 14:31:09 CEST 2020


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

--- Comment #12 from Nick Clemens <nick at bywatersolutions.com> ---
Created attachment 105690
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105690&action=edit
Bug 25683: Fix grouping of results

DBIX doesn't seem to work as I expected - if trying to group by we can only
get the columns we grouped by, otherwise the queries are much more complicated
and come out wrong

This patch removes the 'amountoutstanding' from the query. Note that we do
return patron
object, however, to access all the columns we must discard_changes (or refetch)

Also fixes a typo 'verbosse'

To test:
1 - charge a $1 fine to a patron
2 - pay off the fine
3 - perl misc/cronjobs/update_patrons_category.pl -f J -t J -fu=5 -v
4 - Note the patron is returned twice
5 - export DBIC_TRACE=1
6 - repeat 3 - view the SQL query and see how odd it is
7 - Apply this patch
8 - repeat 3 - simpler query
9 - patron returned only once

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list