On the additem form, if a subfield is marked mandatory but not filled you get: alertString2 += "\n- " + "%s " + MSG_MANDATORY_FIELDS_EMPTY.format(total_errors); It displays an extra "%s"
Created attachment 122860 [details] [review] Bug 28689: Extra %s in alert message when saving an items This patch removes an unnecessary %s in the text built to show when there are errors in the cataloging add item form. To reproduce, open the add item form in cataloging and click "Add item" without filling in all mandatory fields. You should see an alert message that contains, "- %s 1 mandatory fields empty (highlighted)" To test, apply the patch and return to the add item form. Now when you save an incomplete form the message should omit the %s: - 1 mandatory fields empty (highlighted) https://bugs.koha-community.org/show_bug.cgi?id=28690
Created attachment 123289 [details] [review] Bug 28689: Extra %s in alert message when saving an items This patch removes an unnecessary %s in the text built to show when there are errors in the cataloging add item form. To reproduce, open the add item form in cataloging and click "Add item" without filling in all mandatory fields. You should see an alert message that contains, "- %s 1 mandatory fields empty (highlighted)" To test, apply the patch and return to the add item form. Now when you save an incomplete form the message should omit the %s: - 1 mandatory fields empty (highlighted) https://bugs.koha-community.org/show_bug.cgi?id=28690 Signed-off-by: David Nind <david@davidnind.com>
Testing notes: - To make a field in the add item form mandatory: edit the 952 tag and make a subfield mandatory for the bibliographic framework (Administration > Catalog > MARC bibliographic framework)
Created attachment 123294 [details] [review] Bug 28689: Extra %s in alert message when saving an items This patch removes an unnecessary %s in the text built to show when there are errors in the cataloging add item form. To reproduce, open the add item form in cataloging and click "Add item" without filling in all mandatory fields. You should see an alert message that contains, "- %s 1 mandatory fields empty (highlighted)" To test, apply the patch and return to the add item form. Now when you save an incomplete form the message should omit the %s: - 1 mandatory fields empty (highlighted) https://bugs.koha-community.org/show_bug.cgi?id=28690 Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Pushed to master for 21.11, thanks to everybody involved!
Pushed to 21.05.x for 21.05.03
Pushed to 20.11.x for 20.11.09
Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed.