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

            Bug ID: 43483
           Summary: Authority linker treats the same name heading
                    differently in 6XX vs 1XX/7XX
   Initiative type: ---
        Sponsorship ---
            status:
           Product: Koha
           Version: Main
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: MARC Authority data support
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
  Target Milestone: ---

When LinkerConsiderThesaurus is enabled, the authority linker treats a name
heading differently depending on whether it appears in a name field
(100/110/111/700/710/711 etc, where MARC21's 2nd indicator is undefined) or in
the equivalent name-used-as-subject field (600/610/611 etc, where the 2nd
indicator encodes the subject thesaurus).

C4::Heading::MARC21::parse_heading only computes a 'thesaurus' value for 6XX
tags:

  my $thesaurus =
      $tag =~ m/6../
      ? _get_subject_thesaurus($field)
      : undef;    # We can't know the thesaurus for non-subject fields

C4::Heading::_search then only adds a thesaurus constraint to the authority
match query when $thesaurus is defined:

  if ( $check_thesaurus && $thesaurus ) {
      push @marclist, 'thesaurus';
      ...
  }

So the same person can end up matched to, or auto-creating, two separate
authority records from the same bibliographic record: one for their 100 field
(no thesaurus constraint, matches/creates against auth_type PERSO_NAME alone)
and a different one for their 600 field (thesaurus constraint applied, even
when indicator 2 is blank, which is treated as the placeholder thesaurus
'notdefined'). The two authority records end up with identical headings, so
Koha's own duplicate-authority detection later flags them as duplicates when a
cataloguer tries to merge or link them manually, even though the automatic
linker created them as two separate records in the first place.

This is not a new regression. Bug 33277 (2023) deliberately made thesaurus
undef for non-6XX tags, to stop 100/700 fields failing to match authorities
that had no thesaurus recorded at all. Its commit message notes the trade-off
explicitly: "this means that Koha does not support multiple thesaurus records
for authorities outside of subjects." Nobody has revisited the resulting
asymmetry between a name field and the same auth_type used as a subject field.

This was reported by a customer after bug 31925 made the 6XX-vs-thesaurus
distinction more reliable (correctly coding 008/11 for FAST/MeSH/etc on newly
created authorities), which appears to have made this pre-existing asymmetry
more visible: a blank indicator 2 on a 600 is still treated as thesaurus
'notdefined' and still gets the thesaurus filter applied during matching,
unlike the 1XX/7XX occurrence of the exact same name.

Test plan:
1. Turn on LinkerConsiderThesaurus, AutoLinkBiblios and AutoCreateAuthorities.
2. Catalogue a bibliographic record with the same personal name in both a 100
(or 700) field and a 600 field, e.g.:
     100 1_ $a Goddard, Giles
     600 1_ $a Goddard, Giles $x Criticism and interpretation
   (blank/undefined 2nd indicator on the 600, i.e. no thesaurus recorded)
3. Save the record, with no existing matching authority in the catalogue.
4. Note that two separate authority records are created for "Goddard, Giles" --
one from the 100, one from the 600.
5. Try to manually merge or link the two authorities together in the
Authorities module.
   Observe that Koha's duplicate detection considers them duplicates of each
other, confirming they should have matched to a single authority in the first
place.

Related bugs:
Bug 31925 -- AutoCreateAuthorities needs to preserve subject heading thesaurus.
This report surfaced during discussion of that fix; it is not a regression
caused by it.
Bug 33277 -- Do not search using thesaurus when linking non 6XX fields.
Introduced the asymmetry described above, as an accepted trade-off at the time.
Bug 39503 -- Linker should always respect thesaurus with
LinkerConsiderThesaurus on. Related but narrower: only addresses collapsing
008/11='z' plus 040$f within 6XX-to-6XX matching.
Bug 41714 -- MARC21 authorities thesaurus link hardcoded. Touches the same
C4::Heading::MARC21 code (the tag-to-auth_type table), but only makes that
mapping configurable via frameworks; it does not touch the thesaurus
computation or filtering discussed here.

-- 
You are receiving this mail because:
You are the assignee for the bug.
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