Bug 20199

Summary: Letters.t does not pass with new SQL modes
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Test SuiteAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: nick, roch.damour
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20144
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20178
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 20199: Add tests for Koha::Acq::Order->store
Bug 20199: Send a DateTime to DBIC instead of an iso formatted date
Bug 20199: Send a DateTime to DBIC instead of an iso formatted date
Bug 20199: Add tests for Koha::Acq::Order->store
Bug 20199: Send a DateTime to DBIC instead of an iso formatted date

Description Jonathan Druart 2018-02-14 17:20:57 UTC
DBD::mysql::st execute failed: Incorrect date value: '2018-02-14 02:03 PM' for column 'entrydate' at row 1 [for Statement "INSERT INTO `aqorders` ( `basketno`, `biblionumber`, `budget_id`, `entrydate`, `ordernum
ber`, `quantity`, `quantityreceived`) VALUES ( ?, ?, ?, ?, ?, ?, ? )" with ParamValues: 0='14', 1='454', 2='13', 3='2018-02-14 02:03 PM', 4=undef, 5=1, 6=0] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 183
2.
Comment 1 Jonathan Druart 2018-02-14 17:24:47 UTC
Created attachment 71623 [details] [review]
Bug 20199: Add tests for Koha::Acq::Order->store
Comment 2 Jonathan Druart 2018-02-14 17:24:51 UTC
Created attachment 71624 [details] [review]
Bug 20199: Send a DateTime to DBIC instead of an iso formatted date

We do not need to format the date, DBIC handles DateTime correctly.

It fixes t/db_dependent/Letters.t with new SQL modes

Test plan:
  prove t/db_dependent/Letters.t
  prove t/db_dependent/Koha/Acquisition/Order.t
Must return green
Comment 3 Roch D'Amour 2018-02-23 21:56:26 UTC
Created attachment 72163 [details] [review]
Bug 20199: Send a DateTime to DBIC instead of an iso formatted date

We do not need to format the date, DBIC handles DateTime correctly.

It fixes t/db_dependent/Letters.t with new SQL modes

Test plan:
  prove t/db_dependent/Letters.t
  prove t/db_dependent/Koha/Acquisition/Order.t
Must return green

Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>
Comment 4 Katrin Fischer 2018-02-23 22:10:28 UTC
Created attachment 72166 [details] [review]
Bug 20199: Add tests for Koha::Acq::Order->store

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Katrin Fischer 2018-02-23 22:10:39 UTC
Created attachment 72167 [details] [review]
Bug 20199: Send a DateTime to DBIC instead of an iso formatted date

We do not need to format the date, DBIC handles DateTime correctly.

It fixes t/db_dependent/Letters.t with new SQL modes

Test plan:
  prove t/db_dependent/Letters.t
  prove t/db_dependent/Koha/Acquisition/Order.t
Must return green

Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Jonathan Druart 2018-02-26 16:29:22 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 7 Nick Clemens 2018-03-23 01:24:23 UTC
I think this is not needed for 17.11, let me know if I am wrong