[Bug 21600] New: t/db_dependent/api/v1/patrons.t is failing with new SQL modes
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21600 Bug ID: 21600 Summary: t/db_dependent/api/v1/patrons.t is failing with new SQL modes Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: major Priority: P5 - low Component: Test Suite Assignee: tomascohen@gmail.com Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org I have failed fixing this one, Tomas can you have a look please? It seems that we try and insert a rfc3339 formatted date into a datetime or timestamp column. DBD::mysql::st execute failed: Incorrect datetime value: '2018-10-18T12:50:41-03:00' for column 'lastseen' -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21600 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |21597 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21597 [Bug 21597] Test suite is still failing with new default SQL modes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21600 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com, | |martin.renvoize@ptfs-europe | |.com, | |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21600 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21600 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 80875 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=80875&action=edit Bug 21600: /patrons should have timestamp/datetime values converted from rfc3339 into valid MySQL values Bug 21597 enabled the option so set strict SQL modes in koha-conf.xml to be able to improve Koha's comformance to current standards on DB engines. This causes lots of parts of Koha to fail because they rely on MySQL fallbacks that are no longer default behaviours. While we can workaround this by setting SQL modes on runtime, the decision has been that this needs fixing. This patch deals with the /patrons API failing to correctly convert datetimes into valid SQL timestamps. To test: - Run: $ kshell k$ prove t/db_dependent/api/v1/patrons.t => SUCCESS: Tests pass - Add <strict_sql_modes>1</strict_sql_modes> on your koha-conf.xml $ sudo vim /etc/koha/sites/kohadev/koha-conf.xml - Restart memcached and Plack: $ restart_all - Run: k$ prove t/db_dependent/api/v1/patrons.t => FAIL: Tests fail due to updated_on and/or lastseen fields wrong format (MySQL error) - Apply this patch - Run: k$ prove t/db_dependent/api/v1/patrons.t => SUCCESS: Tests pass! It all makes sense! - Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21600 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21600 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21600 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #80875|0 |1 is obsolete| | --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 80876 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=80876&action=edit Bug 21600: /patrons should have timestamp/datetime values converted from rfc3339 into valid MySQL values Bug 21597 enabled the option so set strict SQL modes in koha-conf.xml to be able to improve Koha's comformance to current standards on DB engines. This causes lots of parts of Koha to fail because they rely on MySQL fallbacks that are no longer default behaviours. While we can workaround this by setting SQL modes on runtime, the decision has been that this needs fixing. This patch deals with the /patrons API failing to correctly convert datetimes into valid SQL timestamps. To test: - Run: $ kshell k$ prove t/db_dependent/api/v1/patrons.t => SUCCESS: Tests pass - Add <strict_sql_modes>1</strict_sql_modes> on your koha-conf.xml $ sudo vim /etc/koha/sites/kohadev/koha-conf.xml - Restart memcached and Plack: $ restart_all - Run: k$ prove t/db_dependent/api/v1/patrons.t => FAIL: Tests fail due to updated_on and/or lastseen fields wrong format (MySQL error) - Apply this patch - Run: k$ prove t/db_dependent/api/v1/patrons.t => SUCCESS: Tests pass! It all makes sense! - Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21600 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 80877 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=80877&action=edit Bug 21600: Use str param instead of dt for output_pref Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21600 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21600 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #80876|0 |1 is obsolete| | --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 80898 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=80898&action=edit Bug 21600: /patrons should have timestamp/datetime values converted from rfc3339 into valid MySQL values Bug 21597 enabled the option so set strict SQL modes in koha-conf.xml to be able to improve Koha's comformance to current standards on DB engines. This causes lots of parts of Koha to fail because they rely on MySQL fallbacks that are no longer default behaviours. While we can workaround this by setting SQL modes on runtime, the decision has been that this needs fixing. This patch deals with the /patrons API failing to correctly convert datetimes into valid SQL timestamps. To test: - Run: $ kshell k$ prove t/db_dependent/api/v1/patrons.t => SUCCESS: Tests pass - Add <strict_sql_modes>1</strict_sql_modes> on your koha-conf.xml $ sudo vim /etc/koha/sites/kohadev/koha-conf.xml - Restart memcached and Plack: $ restart_all - Run: k$ prove t/db_dependent/api/v1/patrons.t => FAIL: Tests fail due to updated_on and/or lastseen fields wrong format (MySQL error) - Apply this patch - Run: k$ prove t/db_dependent/api/v1/patrons.t => SUCCESS: Tests pass! It all makes sense! - Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21600 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #80877|0 |1 is obsolete| | --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 80899 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=80899&action=edit Bug 21600: Use str param instead of dt for output_pref Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21600 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21600 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #6 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 18.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21600 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Pushed to 18.05.x for 18.05.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21600 Bug 21600 depends on bug 21597, which changed state. Bug 21597 Summary: Test suite is still failing with new default SQL modes https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21597 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21600 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |fridolin.somers@biblibre.co | |m Status|Pushed to Stable |RESOLVED --- Comment #8 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Depends on Bug 21597 not in 17.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org