Bugzilla – Attachment 147248 Details for
Bug 33032
Alternate holdings broken in staff interface search results
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33032: Remove alternateholdings_count
Bug-33032-Remove-alternateholdingscount.patch (text/plain), 2.23 KB, created by
Jonathan Druart
on 2023-02-23 14:52:23 UTC
(
hide
)
Description:
Bug 33032: Remove alternateholdings_count
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-02-23 14:52:23 UTC
Size:
2.23 KB
patch
obsolete
>From f743c70f4c2962ba69e135f89f6e1779c306ffe1 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 23 Feb 2023 15:46:48 +0100 >Subject: [PATCH] Bug 33032: Remove alternateholdings_count > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > C4/Search.pm | 3 --- > t/db_dependent/Search.t | 2 +- > 2 files changed, 1 insertion(+), 4 deletions(-) > >diff --git a/C4/Search.pm b/C4/Search.pm >index e6ad8b6ff37..416069e1a3a 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -2068,7 +2068,6 @@ sub searchResults { > my $holdingsep = C4::Context->preference("AlternateHoldingsSeparator") || ' '; > my @alternateholdingsinfo = (); > my @holdingsfields = $marcrecord->field(substr $fieldspec, 0, 3); >- my $alternateholdingscount = 0; > > for my $field (@holdingsfields) { > my %holding = ( holding => '' ); >@@ -2082,12 +2081,10 @@ sub searchResults { > } > if ($havesubfield) { > push(@alternateholdingsinfo, \%holding); >- $alternateholdingscount++; > } > } > > $oldbiblio->{'ALTERNATEHOLDINGS'} = \@alternateholdingsinfo; >- $oldbiblio->{'alternateholdings_count'} = $alternateholdingscount; > } > > push( @newresults, $oldbiblio ); >diff --git a/t/db_dependent/Search.t b/t/db_dependent/Search.t >index b7b1fa88224..077d5f5a335 100755 >--- a/t/db_dependent/Search.t >+++ b/t/db_dependent/Search.t >@@ -684,7 +684,7 @@ ok(MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[0],' > ($error, $results_hashref, $facets_loop) = getRecords("Godzina pÄsowej róży","Godzina pÄsowej róży",[ ], [ 'biblioserver' ],20,0,\%branches,\%itemtypes,$query_type,0); > @newresults = searchResults({'interface'=>'intranet'}, $query_desc, $results_hashref->{'biblioserver'}->{'hits'}, 17, 0, 0, > $results_hashref->{'biblioserver'}->{"RECORDS"}); >- is($newresults[0]->{'alternateholdings_count'}, 1, 'Alternate holdings filled in correctly'); >+ is(scalar(@{$newresults[0]->{'ALTERNATEHOLDINGS'}}), 1, 'Alternate holdings filled in correctly'); > > > ## Regression test for Bug 10741 >-- >2.25.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 33032
:
147087
|
147097
|
147247
| 147248