Bug 30224

Summary: Wrong important field shown in cataloguing validation
Product: Koha Reporter: Aleisha Amohia <aleisha>
Component: CatalogingAssignee: Adam Styles <adam.styles>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: jonathan.druart, kyle, m.de.rooy, victor
Version: Main   
Hardware: All   
OS: All   
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
Bug Depends on: 28694    
Bug Blocks:    
Attachments: Bug 30224: Show correct important field in cataloguing validation
Bug 30224: Show correct important field in cataloguing validation
Bug 30224: Show correct important field in cataloguing validation

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.