The quotes.timestamp column is a datetime without default value. It would be better to have it timestamp default current_timestamp()
Wrong assumption. Actually this column is used as "last display at the OPAC". So it can be NULL.
Created attachment 98742 [details] [review] Bug 24640: Allow quotes.timestamp to be NULL It is broken with strict mode enable, timestamp is created without default value. Note that the .sql installer file init the value with NOW(), which is wrong. DBD::mysql::st execute failed: Field 'timestamp' doesn't have a default value [for Statement "INSERT INTO quotes (source, text) VALUES (?, ?);" with ParamValues: 0="poeut", 1="pouet"] at /kohadevbox/koha/tools/quotes/quotes_ajax.pl line 49. Test plan: Create a new quote of the day => Without this patch you will get an error
Created attachment 99062 [details] [review] Bug 24640: Allow quotes.timestamp to be NULL It is broken with strict mode enable, timestamp is created without default value. Note that the .sql installer file init the value with NOW(), which is wrong. DBD::mysql::st execute failed: Field 'timestamp' doesn't have a default value [for Statement "INSERT INTO quotes (source, text) VALUES (?, ?);" with ParamValues: 0="poeut", 1="pouet"] at /kohadevbox/koha/tools/quotes/quotes_ajax.pl line 49. Test plan: Create a new quote of the day => Without this patch you will get an error Signed-off-by: David Nind <david@davidnind.com>
Created attachment 99063 [details] Bug 24640: Screenshot of input field on Firefox Notes (using docker-testing-docker): - I don't see the error mentioned, but the quote is not added to the list - Seems like you couldn't add or edit a quote from at least 18.11.x - The styling is all wonky from at least 19.11.x on Firefox (very narrow height for the input boxes when adding or editing => Google Chrome or Chromium is okay)(see screenshot attachment) - happy to add a new bug for this Updated test plan: 1) Try and add a quote - when you press enter nothing happens and it is n0t added to the list of quotes 2) Apply the patch 3) Run the database update (updatedatabase on koha-testing-docker or perl installer/data/mysql/updatedatabase.pl) 4) Try and add a quote - it should now be added to the list 5) Sign off!
Created attachment 99120 [details] [review] Bug 24640: Allow quotes.timestamp to be NULL It is broken with strict mode enable, timestamp is created without default value. Note that the .sql installer file init the value with NOW(), which is wrong. DBD::mysql::st execute failed: Field 'timestamp' doesn't have a default value [for Statement "INSERT INTO quotes (source, text) VALUES (?, ?);" with ParamValues: 0="poeut", 1="pouet"] at /kohadevbox/koha/tools/quotes/quotes_ajax.pl line 49. Test plan: Create a new quote of the day => Without this patch you will get an error Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Nice work everyone! Pushed to master for 20.05
(In reply to David Nind from comment #4) > - The styling is all wonky from at least 19.11.x on Firefox (very narrow > height for the input boxes when adding or editing => Google Chrome or > Chromium is okay)(see screenshot attachment) - happy to add > a new bug for this Bug 24702 created for this.
Pushed to 19.11.x branch for 19.11.04
backported to 19.05.x for 19.05.09