Bug 33557

Summary: Add a system preference to disable/enable thesaurus checking during authority linking
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: MARC Authority data supportAssignee: Nick Clemens (kidclamp) <nick>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: blocker    
Priority: P5 - low CC: caroline.cyr-la-rose, jonathan.druart, m.de.rooy, martin.renvoize, phil, tomascohen
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31925
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Caroline Cyr La Rose Documentation submission: https://gitlab.com/koha-community/koha-manual/-/merge_requests/687
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.06
Circulation function:
Bug Depends on: 30280, 33277    
Bug Blocks:    
Attachments: Bug 33557: Add LinkerConsiderThesaurus system preference
Bug 33557: Add LinkerConsiderThesaurus system preference
Bug 33557: Add LinkerConsiderThesaurus system preference

Description Nick Clemens (kidclamp) 2023-04-18 12:41:52 UTC
Bug 30280 added support for multiple thesauri, however, this is a major change in behavior. Prior to this patch, heading from different sources would all link to the same authority, and auto generated authorities would link to any source.

After this patch, however, a library will need to reindex their authorities after upgrade or face linking issues. For libraries who auto create authorities, there is the potential for generating a new set of authorities for any record from a differing source.

In order to minimize disruption, we should provide a system preference, disabled by default, to allow libraries to opt in to thesaurus checking
Comment 1 Nick Clemens (kidclamp) 2023-04-18 13:18:49 UTC
Created attachment 149804 [details] [review]
Bug 33557: Add LinkerConsiderThesaurus system preference

Bug 30280 added the ability to use multiple thesauri for authorities in Koha.
This is a large change, and many libraries use authorities in a ess strict manner.
This patch simply adds a preference, disabled by default, to enable this new feature

To test:
1 - Find or create a record with a 650 heading, second indicator 0 (LOC)
2 - Ensure this links to an authority in your system
3 - Disable AutoCreateAuthorities, enable CatalogModuleRelink
4 - Edit the heading to second indicator 2
5 - Save, the heading does not link
6 - Apply patch, updatedatabase, restart all
7 - Edit and save record again
8 - Heading should now link to the LOC authority, despite different second indicator value for source
Comment 2 Phil Ringnalda 2023-04-18 21:21:09 UTC
Created attachment 149830 [details] [review]
Bug 33557: Add LinkerConsiderThesaurus system preference

Bug 30280 added the ability to use multiple thesauri for authorities in Koha.
This is a large change, and many libraries use authorities in a ess strict manner.
This patch simply adds a preference, disabled by default, to enable this new feature

To test:
1 - Find or create a record with a 650 heading, second indicator 0 (LOC)
2 - Ensure this links to an authority in your system
3 - Disable AutoCreateAuthorities, enable CatalogModuleRelink
4 - Edit the heading to second indicator 2
5 - Save, the heading does not link
6 - Apply patch, updatedatabase, restart all
7 - Edit and save record again
8 - Heading should now link to the LOC authority, despite different second indicator value for source

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Comment 3 Martin Renvoize (ashimema) 2023-05-10 16:03:07 UTC
Created attachment 151018 [details] [review]
Bug 33557: Add LinkerConsiderThesaurus system preference

Bug 30280 added the ability to use multiple thesauri for authorities in Koha.
This is a large change, and many libraries use authorities in a ess strict manner.
This patch simply adds a preference, disabled by default, to enable this new feature

To test:
1 - Find or create a record with a 650 heading, second indicator 0 (LOC)
2 - Ensure this links to an authority in your system
3 - Disable AutoCreateAuthorities, enable CatalogModuleRelink
4 - Edit the heading to second indicator 2
5 - Save, the heading does not link
6 - Apply patch, updatedatabase, restart all
7 - Edit and save record again
8 - Heading should now link to the LOC authority, despite different second indicator value for source

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 4 Martin Renvoize (ashimema) 2023-05-10 16:03:31 UTC
All working as expected.. passing QA
Comment 5 Tomás Cohen Arazi (tcohen) 2023-05-10 18:28:52 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 6 Martin Renvoize (ashimema) 2023-05-16 06:45:25 UTC
Many hands makes light work, thankyou everyone!

Pushed to 22.11.x for the next release