I get: DBD::mysql::st execute failed: Incorrect date value: '21/10/2019' for column `koha_kohadev`.`suggestions`.`accepteddate` at row 1 [for Statement "UPDATE `suggestions` SET `accepteddate` = ?, `budgetid` = ?, `copyrightdate` = ?, `manageddate` = ?, `quantity` = ?, `rejecteddate` = ?, `suggesteddate` = ? WHERE ( `suggestionid` = ? )" with ParamValues: 0="21/10/2019", 1=undef, 2=undef, 3='2019-10-21T17:33:23', 4=undef, 5='2019-10-21T17:33:23', 6='2019-10-21T00:00:00', 7=1] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1836. Could someone confirm? Is it a recent regression?
Ok, so, it' weird. Here are the different bugs I found: 1. Edit an existing suggestion that is accepted or rejected, do not change anything and save => You get the failure about the accepteddate format "Incorrect date value" 2. Edit an accepted suggestion, change the accepteddate (not today). => No failure but the accepteddate is set to today 3. Same for manageddate if a status is set
Created attachment 94518 [details] [review] Bug 23854: Fix failure on dates when editing a suggestion
The proposed patch will only fix 1. What is the expected behavior for other dates? If they cannot be edited manually we should disable the inputs.
I think these 3 dates should be set automatically. I can't see any reason, if we want to keep reliable informations about the workflows, where the dates should be manually updated. Will try to test this afternoon, but not sure about my bug comprehension...
Setting to Needs Signoff to collect ideas.
Created attachment 95316 [details] [review] [ON TOP OF 14973] Bug 23854: Fix failure on dates when editing a suggestion This is the patch to use if bug 14973 is pushed first.
Sorry, but I was not able to reproduce this issue: - In acquisition, I found a accepted suggestoin - Edit suggestion using the button at the end of the line - Changing nothing, saving - No error in GUI or log From the result list: - Changed status from accepted to pending - No error in the GUI, warning in the logs: No suggestions ASKED letter transported by email at /home/vagrant/kohaclone/C4/Letters.pm line 608. CGI::param called in list context from /home/vagrant/kohaclone/suggestion/suggestion.pl line 237, this can lead to vulnerabilities. See the warning in "Fetching the value or values of a single named parameter" at /usr/share/perl5/CGI.pm line 412. I think I need more information here.
Created attachment 95397 [details] [review] Bug 23854: Fix failure on dates when editing a suggestion Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> - Watch plack-error-log - Change an accepted suggestion to 'No Status' - Verify error in the logs (use strict mode, depending on DBMS version) - Status changed was not saved - Apply patch - Verify the error is gone, change is saved now.
Created attachment 95409 [details] [review] Bug 23854: Fix failure on dates when editing a suggestion - Watch plack-error-log - Change an accepted suggestion to 'No Status' - Verify error in the logs (use strict mode, depending on DBMS version) - Status changed was not saved - Apply patch - Verify the error is gone, change is saved now. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Thanks guys, all works for me here. Passing QA
Nice work! Pushed to master for 19.11.00
Pushed to 19.05.x for 19.05.05