Bug 33160 - Make sure 773 (host item entry) displays in the cart when not linked by $w
Summary: Make sure 773 (host item entry) displays in the cart when not linked by $w
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial
Assignee: Katrin Fischer
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on: 16522
Blocks:
  Show dependency treegraph
 
Reported: 2023-03-07 16:46 UTC by Katrin Fischer
Modified: 2023-12-28 20:42 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.05
Circulation function:


Attachments
Bug 33160: Use hostinfo to display title information when 773$w is empty (8.34 KB, patch)
2023-03-07 16:58 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 33160: Use hostinfo to display title information when 773$w is empty (8.44 KB, patch)
2023-03-24 09:05 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 33160: (QA follow-up) Adjust condition on biblio object (4.33 KB, patch)
2023-03-24 09:05 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 33160: Use hostinfo to display title information when 773$w is empty (8.50 KB, patch)
2023-03-24 09:08 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 33160: (QA follow-up) Adjust condition on biblio object (4.33 KB, patch)
2023-03-24 09:08 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2023-03-07 16:46:52 UTC
This was an oversight on bug 16522 that implemented the return parameter on get_marc_host, but didn't use it in the templates.
Comment 1 Katrin Fischer 2023-03-07 16:58:50 UTC
Created attachment 147867 [details] [review]
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.
Comment 2 Heather 2023-03-13 18:58:01 UTC
It works!  Step 3 had to be a little different, because there's no "Edit > Add child record"--one has to "New > New child record."  Also, between step 4 & 5 one has to edit the defaul framework to make 773 $g visible in the editor.

Cheerio!
--h2
Comment 3 Marcel de Rooy 2023-03-24 08:36:58 UTC
QAing
Comment 4 Marcel de Rooy 2023-03-24 08:48:13 UTC
Looking at what happened in get_marc_host, I must say that the POD has not been fully updated and that the unit test does not even include this new hostinfo return. Thats really bad to pass thru QA.
Comment 5 Marcel de Rooy 2023-03-24 08:52:22 UTC
+    my ( $host, $relatedparts, $hostinfo ) = $biblio->get_marc_host;
     $dat->{HOSTITEMENTRIES} = $host;

HOSTITEMENTRIES is quite obscure name for a Koha::Biblio object !
Comment 6 Marcel de Rooy 2023-03-24 08:56:16 UTC
basket.tt

-                                            [% IF BIBLIO_RESULT.HOSTITEMENTRIES %]
+                                            [% IF BIBLIO_RESULT.HOSTITEMENTRIES || BIBLIO_RESULT.HOSTINFO %]
                                                 <p>In:
                                                 [% IF BIBLIO_RESULT.HOSTITEMENTRIES.biblionumber %]

The change in the condition makes the next condition vulnerable. Since HOSTITEMENTRIES could be undefined now.
Comment 7 Marcel de Rooy 2023-03-24 08:59:59 UTC
Same here
@@ -244,7 +244,7 @@
                                                         [% IF BIBLIO_RESULT.HOSTITEMENTRIES.biblionumber %]
Comment 8 Marcel de Rooy 2023-03-24 09:05:40 UTC
Created attachment 148639 [details] [review]
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: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 9 Marcel de Rooy 2023-03-24 09:05:42 UTC
Created attachment 148640 [details] [review]
Bug 33160: (QA follow-up) Adjust condition on biblio object

If it is undefined, there is no biblionumber.
If it is, we can safely assume that it has a biblionumber. Which
is the case for most biblio records, lol.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 10 Marcel de Rooy 2023-03-24 09:06:13 UTC
Please open a new report for slight POD adjustments and testing hostinfo.
Comment 11 Marcel de Rooy 2023-03-24 09:06:45 UTC
(In reply to Heather from comment #2)
> It works!  Step 3 had to be a little different, because there's no "Edit >
> Add child record"--one has to "New > New child record."  Also, between step
> 4 & 5 one has to edit the defaul framework to make 773 $g visible in the
> editor.
> 
> Cheerio!
> --h2

You forgot a so line. Will add it now.
Comment 12 Marcel de Rooy 2023-03-24 09:08:13 UTC
Created attachment 148641 [details] [review]
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>
Comment 13 Marcel de Rooy 2023-03-24 09:08:15 UTC
Created attachment 148642 [details] [review]
Bug 33160: (QA follow-up) Adjust condition on biblio object

If it is undefined, there is no biblionumber.
If it is, we can safely assume that it has a biblionumber. Which
is the case for most biblio records, lol.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 14 Heather 2023-03-24 16:26:45 UTC
> You forgot a so line. Will add it now.

Thank you, Marcel!  I'm still very much at newbie at this!
--h2
Comment 15 Tomás Cohen Arazi (tcohen) 2023-04-06 12:52:34 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 16 Jacob O'Mara 2023-04-16 20:37:37 UTC
Nice work, thanks everyone!

Pushed to 22.11.x for the next release.
Comment 17 Katrin Fischer 2023-04-16 20:43:37 UTC
(In reply to Jacob O'Mara from comment #16)
> Nice work, thanks everyone!
> 
> Pushed to 22.11.x for the next release.

Hi Jacob, the dependency is not in 22.11 - not sure if this can work.
Comment 18 Jacob O'Mara 2023-04-19 14:17:32 UTC
Hi Katrin, sorry this message slipped through my radar!!! 

I could be being really very stupid but was the dependency not pushed in 22.11.03?

I'm probably missing something really obvious!
Comment 19 Lucas Gass (lukeg) 2023-05-05 21:33:08 UTC
Missing dependencies for 22.05.x, no backport.