Bug 34663

Summary: Errors in UNIMARC default framework
Product: Koha Reporter: Igor A. Sychev <Igor.A.Sychev>
Component: MARC Bibliographic data supportAssignee: Caroline Cyr La Rose <caroline.cyr-la-rose>
Status: Pushed to oldstable --- QA Contact: Victor Grousset/tuxayo <victor>
Severity: normal    
Priority: P5 - low CC: caroline.cyr-la-rose, fridolin.somers, jonathan.druart, lucas, victor
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00,23.11.06,23.05.12
Circulation function:
Bug Depends on: 30373    
Bug Blocks:    
Attachments: Bug 34663: Errors in UNIMARC default framework
Bug 34663: Errors in UNIMARC default framework
Bug 34663: Errors in UNIMARC default framework

Description Igor A. Sychev 2023-08-30 16:44:29 UTC
New install Koha 23.05.02
Please correct in the Unimarc Default framework.

subfields not in same tabs	
Not all subfields for the following tags are in the same tab (or marked 'ignored').
Code	Description	Tag	Tabs in use
Default framework	410	3,4
Default framework	411	3,4
Default framework	412	3,4
Default framework	413	3,4
Default framework	421	3,4
Default framework	422	3,4
Default framework	423	3,4
Default framework	424	3,4
Default framework	425	3,4
Default framework	430	3,4
Default framework	431	3,4
Default framework	432	3,4
Default framework	433	3,4
Default framework	434	3,4
Default framework	435	3,4
Default framework	436	3,4
Default framework	437	3,4
Default framework	440	3,4
Default framework	441	3,4
Default framework	442	3,4
Default framework	443	3,4
Default framework	444	3,4
Default framework	445	3,4
Default framework	446	3,4
Default framework	447	3,4
Default framework	448	3,4
Default framework	451	3,4
Default framework	452	3,4
Default framework	453	3,4
Default framework	454	3,4
Default framework	455	3,4
Default framework	456	3,4
Default framework	461	3,4
Default framework	462	3,4
Default framework	463	3,4
Default framework	464	3,4
Default framework	470	3,4
Default framework	481	3,4
Default framework	482	3,4
Default framework	488	3,4
Comment 1 Owen Leonard 2023-08-30 17:42:17 UTC
All of the instances of bad tab settings for 400 fields in the default UNIMARC framework are subfield 0, 'Bibliographic Record Identifier.'

Could it have been the intention to hide this subfield, or should they all be updated to show in tab 4?
Comment 2 Igor A. Sychev 2023-08-30 17:56:56 UTC
Need to link records.
All of them should be displayed on tab 4.

$0 Bibliographic Record Identifier
The contents of the 001 field of the item to which the link is being made. Not repeatable.

https://cdn.ifla.org/wp-content/uploads/files/assets/uca/unimarc_updates/BIBLIOGRAPHIC/u-b_4-_linking_entry_block_update.pdf
Comment 3 Caroline Cyr La Rose 2024-02-21 20:05:53 UTC
Created attachment 162324 [details] [review]
Bug 34663: Errors in UNIMARC default framework

This patch corrects the default UNIMARC bibliographic framework to
place all the 4XX subfields in tab 4.

To test:
1. Go to Administration > MARC Bibliographic framework test
   --> There should be errors indicating subfields from 4XX fields
       are in tabs 3 and 4
2. Apply patch and reset_all
3. Redo step 1
   --> It should now say that all subfields for each tag are in the
       same tab (or ignored)
Comment 4 David Nind 2024-02-23 18:47:54 UTC
Created attachment 162397 [details] [review]
Bug 34663: Errors in UNIMARC default framework

This patch corrects the default UNIMARC bibliographic framework to
place all the 4XX subfields in tab 4.

To test:
1. Go to Administration > MARC Bibliographic framework test
   --> There should be errors indicating subfields from 4XX fields
       are in tabs 3 and 4
2. Apply patch and reset_all
3. Redo step 1
   --> It should now say that all subfields for each tag are in the
       same tab (or ignored)

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 Jonathan Druart 2024-02-29 09:03:04 UTC
Fridolin, please confirm or ask someone to confirm this change please.
Comment 6 Victor Grousset/tuxayo 2024-03-22 07:08:05 UTC
It seems to be from Bug 30373, the previous unimarc_framework_DEFAULT.sql had the subfields 0 on the right tab (4):
https://gitlab.com/bgkriegel/Koha/-/blob/3dd12b8ea283de5d29fd89432a8eb412308261eb/installer/data/mysql/en/marcflavour/unimarc/mandatory/unimarc_framework_DEFAULT.sql

The initial migration to the new format had the right tabs. But then a follow-up did many changes including these changes of tab:
674ad809f391cddc83338b7ae787b86e6dd490f2 Bug 30373: Fix visibility, authorised values and descriptions

Commit description doesn't hit at such a goal, might have been collateral damage of scripting or mechanical editing of the file.

So the changes here seems to make sense. Will test asap.
Comment 7 Victor Grousset/tuxayo 2024-03-22 23:25:48 UTC
Created attachment 163752 [details] [review]
Bug 34663: Errors in UNIMARC default framework

This patch corrects the default UNIMARC bibliographic framework to
place all the 4XX subfields in tab 4.

To test:
1. Go to Administration > MARC Bibliographic framework test
   --> There should be errors indicating subfields from 4XX fields
       are in tabs 3 and 4
2. Apply patch and reset_all
3. Redo step 1
   --> It should now say that all subfields for each tag are in the
       same tab (or ignored)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 8 Victor Grousset/tuxayo 2024-03-22 23:26:37 UTC
Works, makes sense, QA script happy, code looks good, passing QA :)
Comment 9 Katrin Fischer 2024-03-25 08:54:15 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 10 Fridolin Somers 2024-05-23 08:32:42 UTC
Pushed to 23.11.x for 23.11.06

Thanks a lot from UNIMARC fan-club ^
Comment 11 Lucas Gass (lukeg) 2024-05-28 16:04:51 UTC
Backported to 23.05.x for upcoming 23.05.12