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)
committerMatt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Mon, 15 May 2023 10:40:52 +0000 (10:40 +0000)
commit1bf99e3e5c8a9dc9540a117979b5311808b3e8a2
tree36d6acdd6ac562353b2e5c7b8d078c5e46a41628
parent7d0595289468cf8d4333ae6af3748c9424accd60
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>
(cherry picked from commit d73f56736669afb522f58f5e2856a5fad54bfc64)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
C4/Heading/MARC21.pm
t/db_dependent/Heading.t
t/db_dependent/Heading_MARC21.t