Bug 30218: Add subfield g to field 150 in C4::Heading::MARC21 mappings
authorThomas Klausner <domm@plix.at>
Thu, 3 Mar 2022 14:39:20 +0000 (15:39 +0100)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 19 Aug 2022 18:45:09 +0000 (15:45 -0300)
commit39df2a2a3d81d7dc5bc2e04ef69129c4d8647110
tree3cc7dbd230fffde7001d4e0a79834366076e44b8
parent85f997744afec8cf1eedfc6d7cfd04e61f988e5f
Bug 30218: Add subfield g to field 150 in C4::Heading::MARC21 mappings

When creating authorities via SRU or linking exising authorities
(via cgi-bin/koha/authorities/auth_finder.pl) the search results are
generated using the hardcoded mappings $bib_heading_fields /
$auth_heading_field from C4::Heading::MARC21. For TOPIC_TERM / field 150
these mappings currently include the subfield `abvxyz68`.

But: We are using the GND provided by Deutsche Nationalbibliothek.
We imported some authorities from there, for example:

http://d-nb.info/gnd/4114171-4 "Kind <0-3 Jahre>" (kid 0-3 years)
http://d-nb.info/gnd/4196417-2 "Kind <0-4 Jahre>" (kid 0-4 years)

When searching for these terms, Koha only displays "Kind", which is not
very helpful, as there are a lot of different authorities for different
age bands.

GND stores "Kind" in 150a, and "0-3 Jahre" in 150g.

But in the hardcoded mappings used by Koha, subfield g is not included.

This patch adds subfield g to these mappings, thus making it possible to
easily select the correct authority.

Test plan:
* Create an authority (or edit an existing one) and set 150g to "foo"
* Create a new biblio (or edit an existing one), go to field 650 and click
  on the search-icon on the right.
* A popup should open, where you can search for "Authority type: TOPIC_TERM",
  enter the name of the authority (150a!) in the search box
* In the resulting list, you will only see the value of 150a.
* Apply the patch
* Search again, now you should see "foo" in the result list

Sponsored-by: Steiermärkische Landesbibliothek
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
C4/Heading/MARC21.pm