Bug 26852 - Add missing X11$e and remove relator term subfields from MARC21 headings
Summary: Add missing X11$e and remove relator term subfields from MARC21 headings
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Bibliographic data support (show other bugs)
Version: master
Hardware: All All
: P5 - low trivial (vote)
Assignee: Janusz Kaczmarek
QA Contact: Testopia
URL:
Keywords: release-notes-needed
Depends on:
Blocks:
 
Reported: 2020-10-28 23:56 UTC by Janusz Kaczmarek
Modified: 2021-08-31 04:27 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Text to go in the release notes:
Version(s) released in:
21.11.00,21.05.03,20.11.10


Attachments
Bug 26852 -- subfield $e missing in X11 definition of MARC21 headings (2.13 KB, patch)
2020-10-29 00:26 UTC, Janusz Kaczmarek
Details | Diff | Splinter Review
Bug 26852 -- subfield $e missing in X11 definition of MARC21 headings (2.35 KB, patch)
2021-04-28 18:06 UTC, Janusz Kaczmarek
Details | Diff | Splinter Review
Bug 26852: subfield $e missing in X11 definition of MARC21 headings (3.28 KB, patch)
2021-08-10 10:17 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 26852: subfield $e missing in X11 definition of MARC21 headings (3.28 KB, patch)
2021-08-11 11:22 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 26852: Fix Heading.t (1.18 KB, patch)
2021-08-16 10:04 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 Janusz Kaczmarek 2020-10-28 23:56:37 UTC
According to MARC 21 definition, subfield $e should be controlled by authority records in X11 fields. Cf.:
http://www.loc.gov/marc/authority/ad111.html
http://www.loc.gov/marc/authority/adx11.html
http://www.loc.gov/marc/bibliographic/bdx11.html

Currently, $e is missing in X11 field description in C4/Heading/MARC21.pm
Comment 1 Janusz Kaczmarek 2020-10-29 00:26:02 UTC
Created attachment 112654 [details] [review]
Bug 26852 -- subfield $e missing in X11 definition of MARC21 headings

Test plan:

1. Have a biblio record with, for example, 711 field with a $e subfield.
2. Have two auth records: one with 111 field reflecting the 711 field and second similar but without $e subfield
3. Have LinkerModule set to Default
4. Run link_bibs_to_authorities.pl
5. 711 should remain unlinked since there were two record found by the Default Linker and no one was chosen.

6. Apply the patch.
7. Run link_bibs_to_authorities.pl
8. 711 should be linked now.

NB zebra index definition is OK:
kohaidx:index_match_heading tag="111" subfields="acdefghjklnpqstvxyz" subdivisions="vxyz">
in etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml
Comment 2 Phil Ringnalda 2021-01-29 18:36:29 UTC
e is almost certainly missing because in x00 and x10 it's the Relator term, which shouldn't be included, so you should also remove j from x11, so a heading with a j will link correctly.
Comment 3 Janusz Kaczmarek 2021-04-28 17:58:12 UTC
(In reply to Phil Ringnalda from comment #2)
> e is almost certainly missing because in x00 and x10 it's the Relator term,
> which shouldn't be included, so you should also remove j from x11, so a
> heading with a j will link correctly.

Yes, you are right.  I missed the $j which should be removed from X11 controlled subfields list (as it contains the relator term).

A corrected version of the patch follows.
Comment 4 Janusz Kaczmarek 2021-04-28 18:06:00 UTC
Created attachment 120284 [details] [review]
Bug 26852 -- subfield $e missing in X11 definition of MARC21 headings

A corrected version of the patch.  

BTW, it removes $e from the subfields list for 100 and 110 in $auth_heading_fields, introduced (by mistake?) by patch 21958 (which was rather wrong - $e should not be controlled by authority record in X00 and X10 fields, as it contains a relator term).
Comment 5 Sara Brown 2021-08-09 14:14:43 UTC
I followed this and it worked as intended - sign-off through sandbox didn't work properly so am signing off here.
Comment 6 Katrin Fischer 2021-08-10 10:17:11 UTC
Created attachment 123665 [details] [review]
Bug 26852: subfield $e missing in X11 definition of MARC21 headings

This patch adds $e to 111 and 611, but removes it from 100 and 110 as it's
used for the relator term there and should not be copied. Same for 111$j.

Test plan:

1. Have a biblio record with, for example, 711 field with a $e subfield.
2. Have two auth records: one with 111 field reflecting the 711 field and second similar but without $e subfield
3. Have LinkerModule set to Default
4. Run link_bibs_to_authorities.pl
5. 711 should remain unlinked since there were two record found by the Default Linker and no one was chosen.

6. Apply the patch.
7. Run link_bibs_to_authorities.pl
8. 711 should be linked now.

Repeat testing in similar fashion for authorities:

9. 100/110 $e
10. 111 $j

NB zebra index definition is OK:
kohaidx:index_match_heading tag="111" subfields="acdefghjklnpqstvxyz" subdivisions="vxyz">
in etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml

Signed-off-by: S. Brown <sbrown@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Katrin Fischer 2021-08-10 10:19:48 UTC
I've added a sign-off line for "S. Brown" manually using the email address from the bugzilla account.

Also amended the test plan and commit message a bit to reflect the additional fixes for $e/$j relator terms.
Comment 8 Jonathan Druart 2021-08-11 11:22:17 UTC
Created attachment 123780 [details] [review]
Bug 26852: subfield $e missing in X11 definition of MARC21 headings

This patch adds $e to 111 and 611, but removes it from 100 and 110 as it's
used for the relator term there and should not be copied. Same for 111$j.

Test plan:

1. Have a biblio record with, for example, 711 field with a $e subfield.
2. Have two auth records: one with 111 field reflecting the 711 field and second similar but without $e subfield
3. Have LinkerModule set to Default
4. Run link_bibs_to_authorities.pl
5. 711 should remain unlinked since there were two record found by the Default Linker and no one was chosen.

6. Apply the patch.
7. Run link_bibs_to_authorities.pl
8. 711 should be linked now.

Repeat testing in similar fashion for authorities:

9. 100/110 $e
10. 111 $j

NB zebra index definition is OK:
kohaidx:index_match_heading tag="111" subfields="acdefghjklnpqstvxyz" subdivisions="vxyz">
in etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml

Signed-off-by: Sara Brown <sbrown@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 9 Jonathan Druart 2021-08-11 11:22:55 UTC
(In reply to Katrin Fischer from comment #7)
> I've added a sign-off line for "S. Brown" manually using the email address
> from the bugzilla account.

First name adjusted.
Comment 10 Jonathan Druart 2021-08-11 11:23:45 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 11 Kyle M Hall 2021-08-13 12:06:13 UTC
Pushed to 21.05.x for 21.05.03
Comment 12 Jonathan Druart 2021-08-16 10:04:46 UTC
Created attachment 123852 [details] [review]
Bug 26852: Fix Heading.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 13 Jonathan Druart 2021-08-16 10:05:44 UTC
(In reply to Jonathan Druart from comment #12)
> Created attachment 123852 [details] [review] [review]
> Bug 26852: Fix Heading.t
> 
> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Patch pushed to master.
Comment 14 Fridolin Somers 2021-08-27 18:54:11 UTC
Bug 21958 as impacted C4::Heading::MARC21
Comment 15 Fridolin Somers 2021-08-27 18:56:13 UTC
Pushed to 20.11.x for 20.11.10

Note that 20.11 does not contain Bug 21958
Comment 16 Victor Grousset/tuxayo 2021-08-31 04:27:07 UTC
Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed.