Bug 33277: Do not search using thesaurus when linking non 6XX fields
authorNick Clemens <nick@bywatersolutions.com>
Mon, 20 Mar 2023 15:44:17 +0000 (15:44 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Wed, 10 May 2023 18:26:22 +0000 (15:26 -0300)
commitd73f56736669afb522f58f5e2856a5fad54bfc64
tree2d68e34519a2c15bfb2b2d2073d5f2e5d6b70496
parent5b3d848b2ea99059ac2c08f1661d338a2f20b672
Bug 33277: Do not search using thesaurus when linking non 6XX fields

This patch sets thesaurus as undefined when linking any field except 6XX

This fixes the case where authrotiy records don't have the thesaurus defined

Consequently - this means that Koha does not support multiple thesaurus records
for authorities outside of subjects

i.e. Using the default linker, and having both an LCSH and Sears record for 'Shakespeare,William'
A 100 entry will find two results and the heading won't be linked. Previously we always linked to the LCSH

To test:
1 - Import the attached auths and biblio (from bug 33159 comment 24)
2 - Set system preferences:
    RequireChoosingExistingAuthority - don't require
    AutoCreateAuthorities - don't generate
    CatalogModuleRelink - Do
    LinkerKeepStale - Don't
    LinkerModule - default
    LinkerRelink - do
3 - Edit the imported bib
4 - Save it
5 - Headings are not linked except 600
6 - Apply patch
7 - Restart all
8 - Edit and save record
9 - Headings are successfully linked

Signed-off-by: Frank Hansen <frank.hansen@ub.lu.se>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
C4/Heading/MARC21.pm
t/db_dependent/Heading.t
t/db_dependent/Heading_MARC21.t