Summary: | Cannot save subscription frequency without display order | ||
---|---|---|---|
Product: | Koha | Reporter: | Andrew Fuerste-Henry <andrew> |
Component: | Serials | Assignee: | Phil Ringnalda <phil> |
Status: | Pushed to main --- | QA Contact: | Aleisha Amohia <aleisha> |
Severity: | normal | ||
Priority: | P5 - low | CC: | aleisha, dcook, phil |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38378 | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
24.11.00
|
|
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 17258 | ||
Attachments: |
Bug 29818: Cannot save subscription frequency without display order
Bug 29818: Cannot save subscription frequency without display order Bug 29818: Cannot save subscription frequency without display order |
Description
Andrew Fuerste-Henry
2022-01-07 13:34:49 UTC
Confirmed on master. Same issue for numbering patterns without display order. I have also tested on 20.11 and there it's possible to save the entries with the display order being empty. So something must have changed and the field should not be mandatory or cause such an ugly error. Yep, still an issue on main. Just bumped into it while testing bug 38378. I've got a full plate at the moment, but if someone wants to take this one, I'd say the solution would just be to make it a required field in the template. Not a perfect solution but certainly a practical one. And as you might expect since it's only us here seeing it, it's from strict-sql-modes. Since numbering patterns were already fixed in bug 28012 I can crib the fix from there. What I can't do is resist the temptation to point out that numbering patterns are currently displayed in a DataTable, which does not have Display order set as the default sort. Created attachment 174445 [details] [review] Bug 29818: Cannot save subscription frequency without display order The schema says that subscription_frequencies.displayorder can be null, and everything else deals with it being null just fine, but if you try to save a new frequency without specifying display order with strict_sql_modes set, you get an error. Test plan: 1. Without the patch, Serials - Manage frequencies - New frequency 2. Description is mandatory, so fill it in, then click Save 3. Boom! Apply patch, restart_all 4. Repeat steps 1-2, and verify that no error is thrown and the new frequency shows up (at the top of the list since nothing comes before something) 5. New frequency, fill in Description, try typing something other than a number in Display order and saving. You should be told to follow the directions that only numeric characters are allowed Sponsored-by: Chetco Community Public Library Thanks for the patch Phil, I was going to protest making the display order required. Created attachment 174577 [details] [review] Bug 29818: Cannot save subscription frequency without display order The schema says that subscription_frequencies.displayorder can be null, and everything else deals with it being null just fine, but if you try to save a new frequency without specifying display order with strict_sql_modes set, you get an error. Test plan: 1. Without the patch, Serials - Manage frequencies - New frequency 2. Description is mandatory, so fill it in, then click Save 3. Boom! Apply patch, restart_all 4. Repeat steps 1-2, and verify that no error is thrown and the new frequency shows up (at the top of the list since nothing comes before something) 5. New frequency, fill in Description, try typing something other than a number in Display order and saving. You should be told to follow the directions that only numeric characters are allowed Sponsored-by: Chetco Community Public Library Signed-off-by: David Nind <david@davidnind.com> Created attachment 174654 [details] [review] Bug 29818: Cannot save subscription frequency without display order The schema says that subscription_frequencies.displayorder can be null, and everything else deals with it being null just fine, but if you try to save a new frequency without specifying display order with strict_sql_modes set, you get an error. Test plan: 1. Without the patch, Serials - Manage frequencies - New frequency 2. Description is mandatory, so fill it in, then click Save 3. Boom! Apply patch, restart_all 4. Repeat steps 1-2, and verify that no error is thrown and the new frequency shows up (at the top of the list since nothing comes before something) 5. New frequency, fill in Description, try typing something other than a number in Display order and saving. You should be told to follow the directions that only numeric characters are allowed Sponsored-by: Chetco Community Public Library Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Pushed for 24.11! Well done everyone, thank you! |