Summary: | Modsuggestion will generate a notice even if the modification failed | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Acquisitions | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | major | ||
Priority: | P5 - low | CC: | m.de.rooy, martin.renvoize, nick, wizzyrea |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
19.05.00, 18.11.06
|
|
Bug Depends on: | 21241 | ||
Bug Blocks: | 22907, 23038 | ||
Attachments: |
Bug 22908: Add tests
Bug 22908: Prevent ModSuggestion to send a notice if something wrong happened Bug 22908: Add tests Bug 22908: Prevent ModSuggestion to send a notice if something wrong happened Bug 22908: Add tests Bug 22908: Prevent ModSuggestion to send a notice if something wrong happened |
Description
Jonathan Druart
2019-05-14 17:19:37 UTC
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 |