From 65e06a4530a529c0c964addfc684430e04a36b93 Mon Sep 17 00:00:00 2001 From: Andreas Roussos Date: Mon, 17 Aug 2020 10:57:03 +0200 Subject: [PATCH] Bug 26223: include item information in OPAC ISBD view The ISBD view in the OPAC interface does not display item information. This patch fixes that. Test plan: 0) Have a biblio with at least one item attached to it and include one of the following snippets in the OPACISBD system preference, depending on your MARC flavour: MARC21: #952|

Items

||
Copy numberShelving locationKoha item typeBarcodeCall number (Full call number)Materials specified (bound volume or other part)
{952t} {952c} {952y} {952p} {952o} {9523}
UNIMARC: #995|

Items

| |
Copy numberShelving locationKoha collectionBarcodeCall number (Full call number)Numbering (volume or other part)
{9956} {995e} {995h} {995f} {995k} {995l}
Switch to the OPAC ISBD view for your biblio; notice how it does not display item information. 1) Apply the patch, and restart Plack/memcached if necessary. 2) Refresh the OPAC ISBD view page, this time you should see item information as per the OPACISBD system preference setting. Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall (cherry picked from commit faddc2072d26475143c25a8527f0cc5f8e0978fe) Signed-off-by: Fridolin Somers --- opac/opac-ISBDdetail.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/opac/opac-ISBDdetail.pl b/opac/opac-ISBDdetail.pl index cc4b5b8d1a..5c854a6279 100755 --- a/opac/opac-ISBDdetail.pl +++ b/opac/opac-ISBDdetail.pl @@ -95,13 +95,15 @@ unless ( $patron and $patron->category->override_hidden_items ) { } my $record = $biblio->metadata->record; +my @items = grep { !$_->hidden_in_opac({ rules => $opachiddenitems_rules }) } @{$biblio->items->as_list} ; my $marcflavour = C4::Context->preference("marcflavour"); my $record_processor = Koha::RecordProcessor->new({ - filters => 'ViewPolicy', + filters => [ 'ViewPolicy', 'EmbedItems' ], options => { interface => 'opac', - frameworkcode => $biblio->frameworkcode + frameworkcode => $biblio->frameworkcode, + items => \@items } }); $record_processor->process($record); -- 2.39.5