Bugzilla – Attachment 95219 Details for
Bug 24002
Test suite is failing on MySQL 8
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24002: Incorrect DATE value: '0000-00-00' in C4/Acquisition.pm
Bug-24002-Incorrect-DATE-value-0000-00-00-in-C4Acq.patch (text/plain), 3.78 KB, created by
Jonathan Druart
on 2019-11-08 13:53:31 UTC
(
hide
)
Description:
Bug 24002: Incorrect DATE value: '0000-00-00' in C4/Acquisition.pm
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2019-11-08 13:53:31 UTC
Size:
3.78 KB
patch
obsolete
>From b5169ae560eed9ee9fb60521f7fe43e723f28880 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 8 Nov 2019 14:46:38 +0100 >Subject: [PATCH] Bug 24002: Incorrect DATE value: '0000-00-00' in > C4/Acquisition.pm > >t/db_dependent/Acquisition/close_reopen_basket.t .. DBD::mysql::st execute failed: Incorrect DATE value: '0000-00-00' [for Statement " > SELECT COUNT( DISTINCT( biblionumber ) ) > FROM aqorders > WHERE basketno = ? > AND (datecancellationprinted IS NULL OR datecancellationprinted='0000-00-00') > " with ParamValues: 0='2'] at /kohadevbox/koha/C4/Acquisition.pm line 3012. >DBD::mysql::st execute failed: Incorrect DATE value: '0000-00-00' [for Statement " > SELECT COUNT( DISTINCT( biblionumber ) ) > FROM aqorders > WHERE basketno = ? > AND (datecancellationprinted IS NULL OR datecancellationprinted='0000-00-00') > " with ParamValues: 0='2'] at /kohadevbox/koha/C4/Acquisition.pm line 3012. > >And anticipating other failures >--- > C4/Acquisition.pm | 15 +++++++-------- > 1 file changed, 7 insertions(+), 8 deletions(-) > >diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm >index a3408883f1..4ac0ea0034 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -681,7 +681,7 @@ sub GetBasketsInfosByBookseller { > COUNT(DISTINCT aqorders.biblionumber) AS total_biblios, > SUM( > IF(aqorders.datereceived IS NULL >- AND (aqorders.datecancellationprinted IS NULL OR aqorders.datecancellationprinted='0000-00-00') >+ AND aqorders.datecancellationprinted IS NULL > , aqorders.quantity > , 0) > ) AS expected_items, >@@ -697,7 +697,7 @@ sub GetBasketsInfosByBookseller { > $query.=" HAVING (closedate IS NULL OR ( > SUM( > IF(aqorders.datereceived IS NULL >- AND (aqorders.datecancellationprinted IS NULL OR aqorders.datecancellationprinted='0000-00-00') >+ AND aqorders.datecancellationprinted IS NULL > , aqorders.quantity > , 0) > ) > 0))" >@@ -1136,15 +1136,14 @@ sub GetOrders { > if ($cancelled) { > $orderby ||= q|biblioitems.publishercode, biblio.title|; > $query .= q| >- AND (datecancellationprinted IS NOT NULL >- AND datecancellationprinted <> '0000-00-00') >+ AND datecancellationprinted IS NOT NULL > |; > } > else { > $orderby ||= > q|aqorders.datecancellationprinted desc, aqorders.timestamp desc|; > $query .= q| >- AND (datecancellationprinted IS NULL OR datecancellationprinted='0000-00-00') >+ AND datecancellationprinted IS NULL > |; > } > >@@ -2188,7 +2187,7 @@ sub GetLateOrders { > OR aqorders.quantityreceived < aqorders.quantity > ) > AND aqbasket.closedate IS NOT NULL >- AND (aqorders.datecancellationprinted IS NULL OR aqorders.datecancellationprinted='0000-00-00') >+ AND aqorders.datecancellationprinted IS NULL > "; > if ($dbdriver eq "mysql") { > $select .= " >@@ -2396,7 +2395,7 @@ sub GetHistory { > $query .= " WHERE 1 "; > > unless ($get_canceled_order or (defined $orderstatus and $orderstatus eq 'cancelled')) { >- $query .= " AND (datecancellationprinted is NULL or datecancellationprinted='0000-00-00') "; >+ $query .= " AND datecancellationprinted IS NULL "; > } > > my @query_params = (); >@@ -3005,7 +3004,7 @@ sub GetBiblioCountByBasketno { > SELECT COUNT( DISTINCT( biblionumber ) ) > FROM aqorders > WHERE basketno = ? >- AND (datecancellationprinted IS NULL OR datecancellationprinted='0000-00-00') >+ AND datecancellationprinted IS NULL > "; > > 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 24002
:
95215
|
95216
|
95217
|
95218
|
95219
|
95220
|
95221
|
95222
|
95223
|
95224
|
95225
|
95226
|
95227
|
99118