From 4f7416bc62355250a430cbd793717edb3308886b Mon Sep 17 00:00:00 2001 From: Adam Styles Date: Fri, 4 Mar 2022 11:22:38 +1100 Subject: [PATCH] Bug 30224: Show correct important field in cataloguing validation This patch fxes the cataloguing validation messages to show the correct tag, when the whole field is important (not just a subfield). Note: Look at Bug 30159 to fix the formatting of the validation popup. 1. Go to Administration -> MARC bibliographic frameworks 2. Click Actions next to a framework, view MARC structure 3. Edit multiple tags (at least 2) and check the Important checkbox. 4. Go to cataloguing and create a new record using the framework you just edited 5. Don't fill any of the important fields. Click Save to force the validation for the important tags 6. Notice that the error message shows that an important field isn't filled, but the tag number shown is repeated for each message. The 'Go to field' link goes to the right tag, but the tag number shown is incorrect. 7. Apply patch and refresh page 8. Click Save to force validation again. 9. Confirm the correct tag number is now showing for each error message. Sponsored-by: Education Services Australia SCIS Signed-off-by: Petro Vashchuk Signed-off-by: Jonathan Druart Signed-off-by: Fridolin Somers Signed-off-by: Kyle M Hall --- .../intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt index 8737d3278d..a7e4b8fd07 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt @@ -688,7 +688,7 @@ function PopupMARCFieldDoc(field) { if( mandatoryFields[prop]["importance"] == "mandatory" ){ StrAlert += "
  • " + _("Field %s is mandatory, at least one of its subfields must be filled.").format( prop ) + ' ' + _("Go to field") + '
  • '; } else { - StrAlert += "
  • " + _("Field %s is important, at least one of its subfields must be filled.").format(arr[0]) + ' ' + _("Go to field") + '
  • '; + StrAlert += "
  • " + _("Field %s is important, at least one of its subfields must be filled.").format(prop) + ' ' + _("Go to field") + '
  • '; } } StrAlert += ""; -- 2.39.5