There is a return value $status_update_table that is set to 0, then we send the alert (whatever the value of this variable). We must return earlier if something happened!
Created attachment 89765 [details] [review] Bug 22908: Add tests
Created attachment 89766 [details] [review] Bug 22908: Prevent ModSuggestion to send a notice if something wrong happened There is a return value $status_update_table that is set to 0, then we send the alert (whatever the value of this variable). We must return earlier if something happened! Test plan: Not sure how to recreate it via the interface, so just run the tests?
Created attachment 89792 [details] [review] Bug 22908: Add tests Signed-off-by: Liz Rea <wizzyrea@gmail.com> Resolved small conflict with number of tests
Created attachment 89793 [details] [review] Bug 22908: Prevent ModSuggestion to send a notice if something wrong happened There is a return value $status_update_table that is set to 0, then we send the alert (whatever the value of this variable). We must return earlier if something happened! Test plan: Not sure how to recreate it via the interface, so just run the tests? Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Works when you run prove on the test, but not with perl [other sql mode]? New test fails then. Shouldnt DBIx always raise a warning if you want to pollute a date field?
(In reply to Marcel de Rooy from comment #5) > Works when you run prove on the test, but not with perl [other sql mode]? > New test fails then. Shouldnt DBIx always raise a warning if you want to > pollute a date field? DBI will not explode and so the notice will be generated. I have no idea how to fix that, I'd say we should require that tests are ran using prove or with the strict_sql_modes flag in the config.
Created attachment 90113 [details] [review] Bug 22908: Add tests Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 90114 [details] [review] Bug 22908: Prevent ModSuggestion to send a notice if something wrong happened There is a return value $status_update_table that is set to 0, then we send the alert (whatever the value of this variable). We must return earlier if something happened! Test plan: Not sure how to recreate it via the interface, so just run the tests? Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Awesome work all! Pushed to master for 19.05
Pushed to 18.11.x for 18.11.06