https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39503

--- Comment #3 from Janusz Kaczmarek <[email protected]> ---
Created attachment 180082
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180082&action=edit
Bug 39503:  Bug 39503 - Linker should always respect thesaurus with
LinkerConsiderThesaurus on

With bug 30280 and subsequent patches we attempt to respect the
thesaurus indication when linking with LinkerConsiderThesaurus on.
However, there are still cases when we link wrong.

This happens when thesaurus in bibliographic field 6XX is defined by
subfield $2. In such a case the authority record should have 008/11 = 'z'
and, according to https://www.loc.gov/marc/authority/ad008.html
(cf. comment for 008/11 = 'z': "A MARC code for the conventions used to
formulate the heading *may* be contained in subfield $f"), may or may have
thesaurus declared in 040 $f.

This is why we make a second search attempt in C4::Heading::_search,
but doing so we have to make sure that the resulting authority
record has not a different thesaurus declared in 040 $f. (Note
that 008/11 and 040 $f are indexed with  the same search
field: subject-heading-thesaurus. So we search for the
second time in the same search field but with
'notdefined' == 008/11='z' instead of the original
thesaurus taken from subfield $2 of the bibliographic
field 6XX.) This means we have to explicitly check the
content of 040 $f of the resulting authority record.

Test plan:
==========
1. Turn on the LinkerConsiderThesaurus systempreference.
2. Create an authority record (e.g. TOPIC_TERM) with 008/11 = 'z' and
   040 $f containing a thesaurus indication (e.g. 'kaba'), and a term
   in field 150 $a (e.g. Early music).
3. Edit a bibliographic record: in field 650 put 2nd indicator '7',
   the term 'Early music' in $a, and a different thesaurus code in $2
   (e.g. 'dbn'). Click the 'Link authorities automatically' button.
   Note that 650 'Early music' (dbn) has been linked with and authority
   record 'Early music' (kaba). This is wrong.
4. Apply the patch ; restart_all.
5. Repeat p. 3. Now the 650 'Early music' (dbn) has not been linked to
   an authority record (650 - No matching authority found.)

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to