Bugzilla – Attachment 168262 Details for
Bug 35125
AutoCreateAuthorities creates separate authorities when thesaurus differs, even with LinkerConsiderThesaurus set to Don't
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35125: Respect LinkerConsiderThesaurus in update_cache
Bug-35125-Respect-LinkerConsiderThesaurus-in-updat.patch (text/plain), 2.36 KB, created by
Martin Renvoize (ashimema)
on 2024-06-28 15:19:09 UTC
(
hide
)
Description:
Bug 35125: Respect LinkerConsiderThesaurus in update_cache
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-06-28 15:19:09 UTC
Size:
2.36 KB
patch
obsolete
>From dce2a9663aebc3f2442752a1f8d1debbe975e0dd Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 25 Jun 2024 14:56:04 +0000 >Subject: [PATCH] Bug 35125: Respect LinkerConsiderThesaurus in update_cache > >Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/Linker/Default.pm | 1 + > t/db_dependent/Linker_Default.t | 9 ++++++++- > 2 files changed, 9 insertions(+), 1 deletion(-) > >diff --git a/C4/Linker/Default.pm b/C4/Linker/Default.pm >index d34e916610e..9b3f225bce8 100644 >--- a/C4/Linker/Default.pm >+++ b/C4/Linker/Default.pm >@@ -92,6 +92,7 @@ sub update_cache { > my $search_form = $heading->search_form(); > my $auth_type = $heading->auth_type(); > my $thesaurus = $heading->{thesaurus} || 'notdefined'; >+ $thesaurus = 'notconsidered' unless C4::Context->preference('LinkerConsiderThesaurus'); > my $fuzzy = 0; > > $self->{'cache'}->{$search_form.$auth_type.$thesaurus}->{'cached'} = 1; >diff --git a/t/db_dependent/Linker_Default.t b/t/db_dependent/Linker_Default.t >index d08e33e9325..9a878da8dcb 100755 >--- a/t/db_dependent/Linker_Default.t >+++ b/t/db_dependent/Linker_Default.t >@@ -42,7 +42,7 @@ my $schema = $builder->schema(); > $schema->storage->txn_begin; > > subtest 'Test caching in get_link and update_cache' => sub { >- plan tests => 16; >+ plan tests => 18; > > my @tags = C4::Context->preference('marcflavour') eq 'UNIMARC' ? (601,'j',602,'a') : (650,'a',655,'a'); > >@@ -120,6 +120,13 @@ subtest 'Test caching in get_link and update_cache' => sub { > is( $authid, 4, "Correct id for sao term is retrieved from the cache" ); > $linker->update_cache($subject_heading4,78); > is( $linker->{cache}->{$subject_heading4->search_form.$subject_heading4->auth_type.$subject_heading4->{'thesaurus'}}->{authid}, 78, "Linker cache for the bnb record is correctly updated by 'update_cache'"); >+ >+ t::lib::Mocks::mock_preference('LinkerConsiderThesaurus',0); >+ $linker->update_cache($subject_heading,32); >+ is( $linker->{cache}->{$subject_heading->search_form.$subject_heading->auth_type.'notconsidered'}->{authid}, 32, "Linker cache is correctly updated by 'update_cache'"); >+ ( $authid, undef ) = $linker->get_link($subject_heading); >+ is( $authid, 32, "Correct id is retrieved from the cache" ); >+ > }; > > $schema->storage->txn_rollback; >-- >2.45.2
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 35125
:
168040
|
168047
|
168078
|
168096
|
168097
|
168261
| 168262