Bugzilla – Attachment 167026 Details for
Bug 36917
Many warnings from t/db_dependent/Authority/Merge.t
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36917: (follow-up) Remove Elasticsearch warnings and tidy
Bug-36917-follow-up-Remove-Elasticsearch-warnings-.patch (text/plain), 2.01 KB, created by
Nick Clemens (kidclamp)
on 2024-05-22 12:02:55 UTC
(
hide
)
Description:
Bug 36917: (follow-up) Remove Elasticsearch warnings and tidy
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2024-05-22 12:02:55 UTC
Size:
2.01 KB
patch
obsolete
>From 87f6bc3827276a7b24e75f567367fadcbde0713b Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 22 May 2024 11:52:53 +0000 >Subject: [PATCH] Bug 36917: (follow-up) Remove Elasticsearch warnings and tidy > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > C4/Heading/MARC21.pm | 6 ++++-- > t/db_dependent/Authority/Merge.t | 8 ++++++++ > 2 files changed, 12 insertions(+), 2 deletions(-) > >diff --git a/C4/Heading/MARC21.pm b/C4/Heading/MARC21.pm >index 4f747d7f92c..40a0d151995 100644 >--- a/C4/Heading/MARC21.pm >+++ b/C4/Heading/MARC21.pm >@@ -401,8 +401,9 @@ sub _get_search_heading { > my $field = shift; > my $subfields = shift; > >- my $heading = ""; >+ my $heading = ""; > return $heading unless $subfields; >+ > my @subfields = $field->subfields(); > my $first = 1; > for ( my $i = 0 ; $i <= $#subfields ; $i++ ) { >@@ -439,8 +440,9 @@ sub _get_display_heading { > my $field = shift; > my $subfields = shift; > >- my $heading = ""; >+ my $heading = ""; > return $heading unless $subfields; >+ > my @subfields = $field->subfields(); > my $first = 1; > for ( my $i = 0 ; $i <= $#subfields ; $i++ ) { >diff --git a/t/db_dependent/Authority/Merge.t b/t/db_dependent/Authority/Merge.t >index 5632141dfd1..cbd4401f1fd 100755 >--- a/t/db_dependent/Authority/Merge.t >+++ b/t/db_dependent/Authority/Merge.t >@@ -28,6 +28,7 @@ BEGIN { > # Optionally change marc flavour > my $marcflavour; > GetOptions( 'flavour:s' => \$marcflavour ); >+$marcflavour //= 'MARC21'; > t::lib::Mocks::mock_preference( 'marcflavour', $marcflavour ) if $marcflavour; > > my $schema = Koha::Database->new->schema; >@@ -40,6 +41,13 @@ $heading_module->mock( > return 1; > } > ); >+my $auth_module = Test::MockModule->new('C4::AuthoritiesMarc'); >+$auth_module->mock( >+ 'GuessAuthTypeCode', >+ sub { >+ $marcflavour eq 'MARC21' ? return 'PERSO_NAME' : return 'NP'; >+ } >+); > > # Global variables, mocking and framework modifications > our @linkedrecords; >-- >2.39.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 36917
:
167012
|
167023
|
167025
|
167026
|
167027
|
167033
|
167034
|
167154
|
167155