Bug 20199 - Letters.t does not pass with new SQL modes
Summary: Letters.t does not pass with new SQL modes
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-14 17:20 UTC by Jonathan Druart
Modified: 2018-12-03 20:04 UTC (History)
2 users (show)

See Also:
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 (1.95 KB, patch)
2018-02-14 17:24 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 20199: Send a DateTime to DBIC instead of an iso formatted date (1.11 KB, patch)
2018-02-14 17:24 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 20199: Send a DateTime to DBIC instead of an iso formatted date (1.15 KB, patch)
2018-02-23 21:56 UTC, Roch D'Amour
Details | Diff | Splinter Review
Bug 20199: Add tests for Koha::Acq::Order->store (2.00 KB, patch)
2018-02-23 22:10 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20199: Send a DateTime to DBIC instead of an iso formatted date (1.22 KB, patch)
2018-02-23 22:10 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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