Bug 33032: Remove alternateholdings_count

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e36e393c7d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 48bc9e54d8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8172a2ac14)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
This commit is contained in:
Jonathan Druart 2023-02-23 15:46:48 +01:00 committed by Arthur Suzuki
parent 1f11c4ba4d
commit 3e127df848
No known key found for this signature in database
GPG Key ID: 7558BEE2BEEEBCAA
2 changed files with 1 additions and 4 deletions

View File

@ -2024,7 +2024,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 => '' );
@ -2038,12 +2037,10 @@ sub searchResults {
}
if ($havesubfield) {
push(@alternateholdingsinfo, \%holding);
$alternateholdingscount++;
}
}
$oldbiblio->{'ALTERNATEHOLDINGS'} = \@alternateholdingsinfo;
$oldbiblio->{'alternateholdings_count'} = $alternateholdingscount;
}
push( @newresults, $oldbiblio );

View File

@ -679,7 +679,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