Bugzilla – Attachment 109849 Details for
Bug 26365
Koha/Acquisition/Order.t is failing with MySQL 8
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26365: Remove comparison with 0000-00-00 for datecancellationprinted
Bug-26365-Remove-comparison-with-0000-00-00-for-da.patch (text/plain), 2.00 KB, created by
Martin Renvoize (ashimema)
on 2020-09-10 12:34:37 UTC
(
hide
)
Description:
Bug 26365: Remove comparison with 0000-00-00 for datecancellationprinted
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-09-10 12:34:37 UTC
Size:
2.00 KB
patch
obsolete
>From 24a318c1708ad0a6107908fe4a56bf5b9c29fa86 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 3 Sep 2020 11:58:14 +0200 >Subject: [PATCH] Bug 26365: Remove comparison with 0000-00-00 for > datecancellationprinted > >Using MySQL 8: >t/db_dependent/Koha/Acquisition/Order.t .. 10/11 No method count found for Koha::Acquisition::Orders DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Incorrect DATE value: '0000-00-00' [for Statement "SELECT COUNT( * ) FROM `aqorders` `me` WHERE ( ( ( `datecancellationprinted` IS NULL OR `datecancellationprinted` = ? ) AND `ordernumber` IN ( ?, ?, ? ) ) )" with ParamValues: 0='0000-00-00', 1=23, 2=24, 3=25] at /kohadevbox/koha/Koha/Objects.pm line 597 > >We must remove the comparison with 0000-00-00 > >Highlighted by bug 23166. > >I wanted to provide a DB rev but we (obviously) cannot: >MySQL [koha_kohadev]> UPDATE aqorders SET datecancellationprinted=NULL WHERE datecancellationprinted="0000-00-00"; >ERROR 1292 (22007): Incorrect date value: '0000-00-00' for column 'datecancellationprinted' at row 1 > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/Acquisition/Orders.pm | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > >diff --git a/Koha/Acquisition/Orders.pm b/Koha/Acquisition/Orders.pm >index 28b8fb80fe..b8ee2f7d65 100644 >--- a/Koha/Acquisition/Orders.pm >+++ b/Koha/Acquisition/Orders.pm >@@ -142,7 +142,7 @@ sub filter_by_current { > my ($self) = @_; > return $self->search( > { >- datecancellationprinted => [ undef, '0000-00-00' ] >+ datecancellationprinted => undef, > } > ); > } >@@ -159,8 +159,7 @@ sub filter_by_cancelled { > my ($self) = @_; > return $self->search( > { >- datecancellationprinted => >- [ { '!=' => [ -and => ( undef, '0000-00-00' ) ] } ] >+ datecancellationprinted => { '!=' => undef } > } > ); > } >-- >2.20.1
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 26365
:
109600
|
109749
| 109849