Bugzilla – Attachment 81616 Details for
Bug 21725
Incorrect HAVING in group by in Acquisitions.pm
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21725: Use full statement in HAVING rather than constructed column
Bug-21725-Use-full-statement-in-HAVING-rather-than.patch (text/plain), 1.37 KB, created by
Nick Clemens (kidclamp)
on 2018-10-30 12:03:17 UTC
(
hide
)
Description:
Bug 21725: Use full statement in HAVING rather than constructed column
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2018-10-30 12:03:17 UTC
Size:
1.37 KB
patch
obsolete
>From e2ea2aaa7c76e4a0299ec1669d6446e446677715 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 30 Oct 2018 11:59:26 +0000 >Subject: [PATCH] Bug 21725: Use full statement in HAVING rather than > constructed column > >To test: >1 - prove -v t/db_dpendent/Acquisition/GetBasketsInfosByBookseller.t >2 - Apply patch >3 - prove -v t/db_dpendent/Acquisition/GetBasketsInfosByBookseller.t >4 - It passes >5 - Have some open/closed and some fully and not full received baskets >6 - View a vendor and confirm baskets are shwn as expected >7 - Check 'Show all baskets' shows all baskets >--- > C4/Acquisition.pm | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > >diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm >index d635a49e79..02605c279d 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -712,7 +712,13 @@ sub GetBasketsInfosByBookseller { > > unless ( $allbaskets ) { > # Don't show the basket if it's NOT CLOSED or is FULLY RECEIVED >- $query.=" HAVING (closedate IS NULL OR (expected_items > 0))" >+ $query.=" HAVING (closedate IS NULL OR ( >+ SUM( >+ IF(aqorders.datereceived IS NULL >+ AND (aqorders.datecancellationprinted IS NULL OR aqorders.datecancellationprinted='0000-00-00') >+ , aqorders.quantity >+ , 0) >+ ) > 0))" > } > > my $sth = $dbh->prepare($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 21725
:
81616
|
81626
|
81812