]> git.koha-community.org Git - koha.git/commit
Bug 29818: Cannot save subscription frequency without display order
authorPhil Ringnalda <phil@chetcolibrary.org>
Wed, 13 Nov 2024 05:31:02 +0000 (21:31 -0800)
committerFridolin Somers <fridolin.somers@biblibre.com>
Wed, 18 Dec 2024 13:37:34 +0000 (14:37 +0100)
commitfeb6d0e2c14b4679c4ad7cb9f697b3200a68e7c7
tree3226388bf58366989ec3c558d10d21f6a2a48650
parent9094a6dcf50c15b7a5158663d1f0ed0cb113a308
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>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 77c003ed544d653345acf4debe968110ea94a1fd)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 20c59c0171738f162f4ff68a3febdc46596342c1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-frequencies.tt
serials/subscription-frequencies.pl