From 6a6a4a3ec713590baa047c5c8b595255f2fad8c2 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Tue, 7 Mar 2023 16:49:35 +0000 Subject: [PATCH] Bug 33160: Use hostinfo to display title information when 773$w is empty When a 773 entry is not linked to another record using 773$w or by using Easyanalytics, the title information would not display. To test: 1. Activate the UseControlNumber system preference 2. Search for a record and make sure it has 001 set to some value. 3. Use Edit > Add child record to create an analytical record from this record. 4. Make sure 773$w was filled in and finish by adding any mandatory fields, save. 5. Add this record to your cart. Also add a 773$g with the pages or similar. 6. Create another record with 773$t and $g, but without $w. 7. Also add this record to your cart. 8. Look at the cart brief and full view in staff and OPAC. 9. Verify the In: source information only displays for the first record. 10. Apply patch 11. Veriy the In: source information now displays for both records on all 4 pages. Signed-off-by: Heather Hernandez Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi --- basket/basket.pl | 3 ++- .../intranet-tmpl/prog/en/modules/basket/basket.tt | 8 ++++---- .../opac-tmpl/bootstrap/en/modules/opac-basket.tt | 10 +++++----- opac/opac-basket.pl | 3 ++- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/basket/basket.pl b/basket/basket.pl index 54fabe44d4..edfd9df889 100755 --- a/basket/basket.pl +++ b/basket/basket.pl @@ -96,9 +96,10 @@ foreach my $biblionumber ( @bibs ) { $dat->{MARCSERIES} = $marcseriesarray; $dat->{MARCURLS} = $marcurlsarray; $dat->{HASAUTHORS} = $hasauthors; - my ( $host, $relatedparts ) = $biblio->get_marc_host; + my ( $host, $relatedparts, $hostinfo ) = $biblio->get_marc_host; $dat->{HOSTITEMENTRIES} = $host; $dat->{RELATEDPARTS} = $relatedparts; + $dat->{HOSTINFO} = $hostinfo; push( @results, $dat ); } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt index 15371ae67a..43365f4c44 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt @@ -219,14 +219,14 @@ [% END %] - [% IF BIBLIO_RESULT.HOSTITEMENTRIES %] + [% IF BIBLIO_RESULT.HOSTITEMENTRIES || BIBLIO_RESULT.HOSTINFO %] In [% IF BIBLIO_RESULT.HOSTITEMENTRIES.biblionumber %]

[% INCLUDE 'biblio-title.inc' link = 1 biblio=BIBLIO_RESULT.HOSTITEMENTRIES %] [% BIBLIO_RESULT.RELATEDPARTS | html %]

[% ELSE %] -

[% BIBLIO_RESULT.HOSTITEMENTRIES | html %]

+

[% BIBLIO_RESULT.HOSTINFO | html %]

[% END %] @@ -298,12 +298,12 @@ [% IF ( BIBLIO_RESULT.notes ) %]

[% BIBLIO_RESULT.notes | html %]

[% END %] - [% IF BIBLIO_RESULT.HOSTITEMENTRIES %] + [% IF BIBLIO_RESULT.HOSTITEMENTRIES || BIBLIO_RESULT.HOSTINFO %]

In: [% IF BIBLIO_RESULT.HOSTITEMENTRIES.biblionumber %] [% INCLUDE 'biblio-title.inc' link = 1 biblio=BIBLIO_RESULT.HOSTITEMENTRIES %] [% BIBLIO_RESULT.RELATEDPARTS | html %] [% ELSE %] - [% BIBLIO_RESULT.HOSTITEMENTRIES | html %] + [% BIBLIO_RESULT.HOSTINFO | html %] [% END %]

[% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt index 307c391084..5f8c9a1eee 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt @@ -236,7 +236,7 @@ [% END %] - [% IF BIBLIO_RESULT.HOSTITEMENTRIES %] + [% IF BIBLIO_RESULT.HOSTITEMENTRIES || BIBLIO_RESULT.HOSTINFO %] In @@ -244,7 +244,7 @@ [% IF BIBLIO_RESULT.HOSTITEMENTRIES.biblionumber %] [% INCLUDE 'biblio-title.inc' biblio=BIBLIO_RESULT.HOSTITEMENTRIES %] [% BIBLIO_RESULT.RELATEDPARTS | html %] [% ELSE %] - [% BIBLIO_RESULT.HOSTITEMENTRIES | html %] + [% BIBLIO_RESULT.HOSTINFO| html %] [% END %]

@@ -310,12 +310,12 @@ [% END %] - [% IF BIBLIO_RESULT.HOSTITEMENTRIES %] + [% IF BIBLIO_RESULT.HOSTITEMENTRIES || BIBLIO_RESULT.HOSTINFO %]

In: [% IF BIBLIO_RESULT.HOSTITEMENTRIES.biblionumber %] - [% INCLUDE 'biblio-title.inc' biblio=BIBLIO_RESULT.HOSTITEMENTRIES %] [% BIBLIO_RESULT.RELATEDPARTS | html %] + [% INCLUDE 'biblio-title.inc' biblio=BIBLIO_RESULT.HOSTITEMENTRIES %] [% BIBLIO_RESULT.RELATEDPARTS | html %] [% ELSE %] - [% BIBLIO_RESULT.HOSTITEMENTRIES | html %] + [% BIBLIO_RESULT.HOSTINFO | html %] [% END %]

[% END %] diff --git a/opac/opac-basket.pl b/opac/opac-basket.pl index 31096332b6..7c57867438 100755 --- a/opac/opac-basket.pl +++ b/opac/opac-basket.pl @@ -117,9 +117,10 @@ foreach my $biblionumber ( @bibs ) { $dat->{MARCSERIES} = $marcseriesarray; $dat->{MARCURLS} = $marcurlsarray; $dat->{HASAUTHORS} = $hasauthors; - my ( $host, $relatedparts ) = $biblio->get_marc_host; + my ( $host, $relatedparts, $hostinfo ) = $biblio->get_marc_host; $dat->{HOSTITEMENTRIES} = $host; $dat->{RELATEDPARTS} = $relatedparts; + $dat->{HOSTINFO} = $hostinfo; push( @results, $dat ); } -- 2.39.5