Bug 30224: Show correct important field in cataloguing validation
authorAdam Styles <adam.styles@esa.edu.au>
Fri, 4 Mar 2022 00:22:38 +0000 (11:22 +1100)
committerFridolin Somers <fridolin.somers@biblibre.com>
Wed, 27 Apr 2022 01:01:56 +0000 (15:01 -1000)
commit0ba9d950988522d9242b2c7ef251780c02bb1fd0
treef92064f9a0eb7933fff4f1b24b4237ca69cff9a8
parent545922e4cbde833494155a25382e23ff8f59e7e3
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 <stalkernoid@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt