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

--- Comment #2 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 205295
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205295&action=edit
Bug 43483: Don't treat blank thesaurus indicator as 'notdefined' for matching

C4::Heading::MARC21::_get_subject_thesaurus coerced a blank/undefined
2nd indicator on a 6XX field to the literal thesaurus value
'notdefined', while parse_heading leaves the thesaurus undef for the
equivalent 1XX/7XX name field. C4::Heading::_search only applies a
thesaurus constraint to the authority-matching query when thesaurus is
defined, so the same personal name ended up searched/created without
any thesaurus constraint via a 100/700 field, but with a hard
'notdefined' constraint via a 600 field with no thesaurus recorded -
letting the linker create two separate authority records for the same
heading, which Koha's own duplicate-authority detection then flags as
duplicates.

A blank/undefined 2nd indicator asserts no thesaurus at all, so it
should be treated the same as a non-subject field: leave thesaurus
undef, and only apply a constraint when a thesaurus is explicitly
coded (indicator 0-7).

Test plan:
1. Run t/db_dependent/Heading_MARC21.t and t/db_dependent/Heading.t -
   all tests pass, including new cases asserting no thesaurus is
   generated for a 6XX field with a blank/undefined 2nd indicator, and
   that no thesaurus constraint is added to the search query in that
   case.
2. Turn on LinkerConsiderThesaurus, AutoLinkBiblios and
   AutoCreateAuthorities.
3. Catalogue a bibliographic record with the same personal name in
   both a 100 (or 700) field and a 600 field with a blank 2nd
   indicator, e.g.:
     100 1_ $a Goddard, Giles
     600 1_ $a Goddard, Giles $x Criticism and interpretation
4. Save the record, with no existing matching authority in the
   catalogue.
5. Confirm only one authority record is created for "Goddard, Giles",
   used by both the 100 and the 600.

Sponsored-by: Martin Renvoize <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to