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 <heather_hernandez@nps.gov>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Katrin Fischer 2023-03-07 16:49:35 +00:00 committed by Tomas Cohen Arazi
parent 0d125917a1
commit 6a6a4a3ec7
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
4 changed files with 13 additions and 11 deletions

View file

@ -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 );
}

View file

@ -219,14 +219,14 @@
</tr>
[% END %]
[% IF BIBLIO_RESULT.HOSTITEMENTRIES %]
[% IF BIBLIO_RESULT.HOSTITEMENTRIES || BIBLIO_RESULT.HOSTINFO %]
<tr>
<th scope="row">In</th>
<td>
[% IF BIBLIO_RESULT.HOSTITEMENTRIES.biblionumber %]
<p>[% INCLUDE 'biblio-title.inc' link = 1 biblio=BIBLIO_RESULT.HOSTITEMENTRIES %] [% BIBLIO_RESULT.RELATEDPARTS | html %]</p>
[% ELSE %]
<p>[% BIBLIO_RESULT.HOSTITEMENTRIES | html %]</p>
<p>[% BIBLIO_RESULT.HOSTINFO | html %]</p>
[% END %]
</td>
</tr>
@ -298,12 +298,12 @@
[% IF ( BIBLIO_RESULT.notes ) %]
<p>[% BIBLIO_RESULT.notes | html %]</p>
[% END %]
[% IF BIBLIO_RESULT.HOSTITEMENTRIES %]
[% IF BIBLIO_RESULT.HOSTITEMENTRIES || BIBLIO_RESULT.HOSTINFO %]
<p>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 %]
</p>
[% END %]

View file

@ -236,7 +236,7 @@
</tr>
[% END %]
[% IF BIBLIO_RESULT.HOSTITEMENTRIES %]
[% IF BIBLIO_RESULT.HOSTITEMENTRIES || BIBLIO_RESULT.HOSTINFO %]
<tr>
<th scope="row">In</th>
<td>
@ -244,7 +244,7 @@
[% IF BIBLIO_RESULT.HOSTITEMENTRIES.biblionumber %]
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% BIBLIO_RESULT.HOSTITEMENTRIES.biblionumber | uri %]">[% INCLUDE 'biblio-title.inc' biblio=BIBLIO_RESULT.HOSTITEMENTRIES %]</a> [% BIBLIO_RESULT.RELATEDPARTS | html %]
[% ELSE %]
[% BIBLIO_RESULT.HOSTITEMENTRIES | html %]
[% BIBLIO_RESULT.HOSTINFO| html %]
[% END %]
</p>
</td>
@ -310,12 +310,12 @@
<span id="newtag[% BIBLIO_RESULT.biblionumber | html %]_status" class="tagstatus results_summary" style="display:none">Tag status here.</span>
[% END %]
[% IF BIBLIO_RESULT.HOSTITEMENTRIES %]
[% IF BIBLIO_RESULT.HOSTITEMENTRIES || BIBLIO_RESULT.HOSTINFO %]
<p>In:
[% IF BIBLIO_RESULT.HOSTITEMENTRIES.biblionumber %]
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% BIBLIO_RESULT.HOSTITEMENTRIES.biblionumber | uri %]">[% INCLUDE 'biblio-title.inc' biblio=BIBLIO_RESULT.HOSTITEMENTRIES %]</a> [% BIBLIO_RESULT.RELATEDPARTS | html %]
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% BIBLIO_RESULT.HOSTITEMENTRIES.biblionumber | uri %]">[% INCLUDE 'biblio-title.inc' biblio=BIBLIO_RESULT.HOSTITEMENTRIES %]</a> [% BIBLIO_RESULT.RELATEDPARTS | html %]
[% ELSE %]
[% BIBLIO_RESULT.HOSTITEMENTRIES | html %]
[% BIBLIO_RESULT.HOSTINFO | html %]
[% END %]
</p>
[% END %]

View file

@ -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 );
}