Bug 31925 - AutoCreateAuthorities needs to preserve subject heading thesaurus to not create duplicate authority records
Summary: AutoCreateAuthorities needs to preserve subject heading thesaurus to not crea...
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Authority data support (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 30280
Blocks:
  Show dependency treegraph
 
Reported: 2022-10-21 22:24 UTC by Phil Ringnalda
Modified: 2023-11-17 01:03 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Ringnalda 2022-10-21 22:24:03 UTC
Bug 30280 taught the linker that "650 _ 0 $aFeminism" and "650 _ 7 $aFeminism$2sao" are not the same heading, so a bib record containing the latter should not be linked to the authority record which matches the former.

However, AutoCreateAuthorities just creates LCSH authority records from anything, no matter what the values of indicator 2 and subfield 2 are.

As a result, if you have an LCSH authority record for a term, and you import/create a non-LCSH term in a bib record and save it, AutoCreateAuthorities will create a new duplicate LCSH authority record and link to that. Every single time, a new duplicate.

Steps to reproduce:

1. Use ElasticSearch, since the patch for bug 30280 only expected to work there, and in fact broke linking on Zebra, bug 31924.
2. Enable the preferences AutoCreateAuthorities, AutoLinkBiblios, CatalogModuleRelink
3. Edit any bib record, add a 650 tag, set the second indicator to 7, type Feminism in subfield a and type sao in subfield 2.
4. Save the record, edit it again, note the authority record id in subfield 9 of the Feminism heading.
5. Edit any other bib record, add a 650 tag, set the second indicator to 7, type Feminism in subfield a and type sao in subfield 2.
6. Save the record, edit it again, note the authority record id in subfield 9 of the Feminism heading.

The two authority record ids should be the same, since the headings are identical, but instead one will be linked to, say, 1708 and the next to 1709, an identical duplicate record. Rather than setting position 11 of field 008 in the authority record to "a" for LCSH, AutoCreateAuthorities should have set it to "z" for Other and put sao in subfield f of field 040 (and for non-7, non-0 values of indicator 2, it should be setting 008/11 to the correct letter for that indicator value).
Comment 1 Katrin Fischer 2022-11-17 11:36:27 UTC
Could we get some attention to this one?
Comment 2 Katrin Fischer 2022-11-17 11:37:26 UTC
Just some thought: I think Phil's suggestion for making Koha create correct records is the right one. But also: what do we do with the existing 'bad' records. Could it be an option to make the new stricter behavior dependent on a system preference?
Comment 3 Agnes Rivers-Moore 2023-03-03 22:53:44 UTC
Definitely interested as a librarian/user - we recently noticed that Authorities are duplicating out of control! Sorry I can't help with coding.