]> git.koha-community.org Git - koha.git/commit
Bug 27784: Don't parse subdivision authorities as headings
authorNick Clemens <nick@bywatersolutions.com>
Fri, 26 Feb 2021 14:28:42 +0000 (14:28 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 4 Mar 2021 12:20:09 +0000 (13:20 +0100)
commit8512ccb4465c01bba9e56cf93eb15aff970cbab0
tree31480c30139c73bcec1205dc4d97f8cc696eb5c0
parente16cd2afc5a2e651ab3b0bf9ab2ff8c40f3c169f
Bug 27784: Don't parse subdivision authorities as headings

Subdivision authorities are not used for linking, however, they are recognized by
C4::AuthoritiesMarc

While these records are not used for linking, they could provide reference and
should be allowed to exist in the catalog without breaking ES indexing

THis patch simply skips the step of parsing the authorities into the linking form
if the type contains '_SUBD'

To test:
1 - Import a subdivision authority record via Z39 or use the one attached to this bug
2 - perl misc/search_tools/rebuild_elasticsearch.pl -v -d
3 - Authority indexing dies:
   Use of uninitialized value $tag in hash element at /usr/share/perl5/MARC/Record.pm line 202.
   Use of uninitialized value $tag in regexp compilation at /usr/share/perl5/MARC/Record.pm line 206.
   Use of uninitialized value $tag in hash element at /usr/share/perl5/MARC/Record.pm line 207.
   Can't call method "tag" on an undefined value at /kohadevbox/koha/C4/Heading.pm line 71.
4 - Apply patches
5 - reindex
6 - Success!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d67fc5e010f5efba79980626beed88755f420c48)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Koha/SearchEngine/Elasticsearch.pm