Bugzilla – Attachment 122654 Details for
Bug 28676
AutoCreateAuthorities can repeatedly generate authority records when using Default linker and heading is cached
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28676: Cache and retrieve match_count when searching a cached heading
Bug-28676-Cache-and-retrieve-matchcount-when-searc.patch (text/plain), 1.92 KB, created by
Nick Clemens
on 2021-07-07 15:44:31 UTC
(
hide
)
Description:
Bug 28676: Cache and retrieve match_count when searching a cached heading
Filename:
MIME Type:
Creator:
Nick Clemens
Created:
2021-07-07 15:44:31 UTC
Size:
1.92 KB
patch
obsolete
>From 8cc6c8c6805eddb93b7e875c4004d4f6ebe1c014 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 7 Jul 2021 15:39:43 +0000 >Subject: [PATCH] Bug 28676: Cache and retrieve match_count when searching a > cached heading > >We use match_count to determine if a new authority record should be created, however, >we were not adding this count to the cache, so if a record returned too many matches on first >lookup, we would create a new record on the second lookup > >To test: >1 - Set Linker Module to 'Default' >2 - Enable AutoCreateAuthorities and BiblioAddsAuthorities and CatalogModuleRelink and LinkerRelink >3 - Add two copies of a single authority via Z39 >4 - Add two headings for that authority to a bib record (e.g. a 610 and 710) >5 - Save the record and note a new authority is generated >6 - Repeat and see another is generated >7 - Apply patch >8 - Restart all the things >9 - Save the record again, no new authority created >--- > C4/Linker/Default.pm | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/C4/Linker/Default.pm b/C4/Linker/Default.pm >index 934e87536a..a6d45c5c91 100644 >--- a/C4/Linker/Default.pm >+++ b/C4/Linker/Default.pm >@@ -38,6 +38,7 @@ sub get_link { > if ( $self->{'cache'}->{$search_form.$auth_type}->{'cached'} ) { > $authid = $self->{'cache'}->{$search_form.$auth_type}->{'authid'}; > $fuzzy = $self->{'cache'}->{$search_form.$auth_type}->{'fuzzy'}; >+ $match_count = $self->{'cache'}->{$search_form.$auth_type}->{'match_count'}; > } > else { > >@@ -78,6 +79,7 @@ sub get_link { > $self->{'cache'}->{$search_form.$auth_type}->{'cached'} = 1; > $self->{'cache'}->{$search_form.$auth_type}->{'authid'} = $authid; > $self->{'cache'}->{$search_form.$auth_type}->{'fuzzy'} = $fuzzy; >+ $self->{'cache'}->{$search_form.$auth_type}->{'match_count'} = $match_count; > } > return $self->SUPER::_handle_auth_limit($authid), $fuzzy, $match_count; > } >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 28676
:
122653
|
122654
|
124430
|
124431
|
125026
|
125027
|
125028