Bug 30224 - Wrong important field shown in cataloguing validation
Summary: Wrong important field shown in cataloguing validation
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Adam Styles
QA Contact: Testopia
URL:
Keywords:
Depends on: 28694
Blocks:
  Show dependency treegraph
 
Reported: 2022-03-04 00:50 UTC by Aleisha Amohia
Modified: 2022-06-17 03:18 UTC (History)
4 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This patch fxes the cataloguing validation messages to show the correct tag, when the whole field is important (not just a subfield).
Version(s) released in:
22.05.00,21.11.06


Attachments
Bug 30224: Show correct important field in cataloguing validation (2.94 KB, patch)
2022-03-04 00:54 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 30224: Show correct important field in cataloguing validation (2.99 KB, patch)
2022-04-21 12:51 UTC, Peter Vashchuk
Details | Diff | Splinter Review
Bug 30224: Show correct important field in cataloguing validation (3.06 KB, patch)
2022-04-22 13:13 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Aleisha Amohia 2022-03-04 00:50:14 UTC
To reproduce:

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.

Note: we're aware of the weird HTML display, this is fixed by Bug 30159.
Comment 1 Aleisha Amohia 2022-03-04 00:54:42 UTC
Created attachment 131367 [details] [review]
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
Comment 2 Peter Vashchuk 2022-04-21 12:51:53 UTC
Created attachment 133551 [details] [review]
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>
Comment 3 Jonathan Druart 2022-04-22 13:13:23 UTC
Created attachment 133677 [details] [review]
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>
Comment 4 Fridolin Somers 2022-04-27 01:04:15 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 5 Kyle M Hall 2022-05-06 16:28:18 UTC
Pushed to 21.11.x for 21.11.06
Comment 6 Victor Grousset/tuxayo 2022-06-17 03:18:49 UTC
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed.