Bugzilla – Attachment 107792 Details for
Bug 25683
update_patron_categories.pl should recognize no fine history = 0 outstanding fines
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25683: (follow-up) Use COALESCE instead of IFNULL
Bug-25683-follow-up-Use-COALESCE-instead-of-IFNULL.patch (text/plain), 1.21 KB, created by
Nick Clemens
on 2020-08-04 18:29:09 UTC
(
hide
)
Description:
Bug 25683: (follow-up) Use COALESCE instead of IFNULL
Filename:
MIME Type:
Creator:
Nick Clemens
Created:
2020-08-04 18:29:09 UTC
Size:
1.21 KB
patch
obsolete
>From bbcece16c827f2289a079cada0d5c483b00bc699 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 4 Aug 2020 18:28:42 +0000 >Subject: [PATCH] Bug 25683: (follow-up) Use COALESCE instead of IFNULL > >--- > Koha/Patrons.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/Koha/Patrons.pm b/Koha/Patrons.pm >index c20a6599bf..3b3b4b1cb6 100644 >--- a/Koha/Patrons.pm >+++ b/Koha/Patrons.pm >@@ -399,8 +399,8 @@ sub search_patrons_to_update_category { > $query{join} = ["accountlines"]; > $query{columns} = ["borrowernumber"]; > $query{group_by} = ["borrowernumber"]; >- $query{having} = \['IFNULL(sum(accountlines.amountoutstanding),0) <= ?',$params->{fine_max}] if defined $params->{fine_max}; >- $query{having} = \['IFNULL(sum(accountlines.amountoutstanding),0) >= ?',$params->{fine_min}] if defined $params->{fine_min}; >+ $query{having} = \['COALESCE(sum(accountlines.amountoutstanding),0) <= ?',$params->{fine_max}] if defined $params->{fine_max}; >+ $query{having} = \['COALESCE(sum(accountlines.amountoutstanding),0) >= ?',$params->{fine_min}] if defined $params->{fine_min}; > } > return $self->search($search_params,\%query); > } >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 25683
:
105620
|
105660
|
105662
|
105690
|
105704
|
105705
|
107792
|
107850
|
107851
|
107852