Bug 17867 - Improve display of source (MARC21 773) in result list
Summary: Improve display of source (MARC21 773) in result list
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Bibliographic data support (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
: 19606 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-01-09 15:57 UTC by Katrin Fischer
Modified: 2020-01-11 19:53 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 17867 Improve display of MARC21 773 in result list (2.64 KB, patch)
2017-01-18 22:57 UTC, Karen
Details | Diff | Splinter Review
Bug 17867 Improve display of MARC21 773 in result list (1.18 KB, patch)
2017-01-18 23:18 UTC, Karen
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2017-01-09 15:57:44 UTC
Currently only $t is shown. If there is no author in $a, the title goes in $a and there is no $t. We should also catch this case and show at least a and t.

From the XSLT:
 928     <xsl:if test="marc:datafield[@tag=773]">
 929         <xsl:for-each select="marc:datafield[@tag=773]">
 930             <xsl:if test="marc:subfield[@code='t']">
 931     <span class="results_summary">
 932     <span class="label">Source: </span>
 933             <xsl:value-of select="marc:subfield[@code='t']"/>
 934     </span>
 935             </xsl:if>
 936         </xsl:for-each>
 937     </xsl:if>

Note: if there were multiple 773, the lable would be printed mulitple times.
Comment 1 Aleisha Amohia 2017-01-18 02:01:58 UTC
Hi, I'm not sure how to reproduce this because the 773a and 773t fields show for me in both staff client and OPAC. Can you please provide a test plan on how to reproduce?
Comment 2 Katrin Fischer 2017-01-18 02:13:34 UTC
To test:
- Add a record with 773$a (no $t!) and a record with 773$a and $t
- View it on the detail pages and result lists in staff and OPAC
- On the detail pages, 773 should show in both cases
- On the result lists, 773 doesn't appear to show (another enh for later maybe?)
- Put the records on a list
- On the list result list Source: only shows for record with $t

So $a is usually the author, but if there is no author, it will have the title, and $t is empty (cataloguing rules... can't really explain better). Just saying it's totally valid that there is only $a and no $t, so we should account for this case :)
Comment 3 Karen 2017-01-18 22:57:48 UTC
Created attachment 59189 [details] [review]
Bug 17867 Improve display of MARC21 773 in result list

Test Plan:

1) Add a record with 773$a (no $t!) and another record with 773$a and $t
2) View it on the detail pages and result lists in staff and OPAC
3) Confirm that 773$a and $t show on the detail page
4) Confirm that 773$a doesn't show on the results list but $t does.
5) Apply patch and refresh the result list page
6) 733$a and $t should now both show on the result list page
Comment 4 Karen 2017-01-18 23:18:34 UTC
Created attachment 59193 [details] [review]
Bug 17867 Improve display of MARC21 773 in result list

I had to undo the changes I made previously in file MARC21slim2intranetResults.xsl. Only change the MARC21slim2OPACResults.xsl.
Comment 5 Katrin Fischer 2017-10-15 11:19:30 UTC
Comment on attachment 59189 [details] [review]
Bug 17867 Improve display of MARC21 773 in result list

Review of attachment 59189 [details] [review]:
-----------------------------------------------------------------

Looking at the code this isn't quite right yet and given the age of the patch I am not sure if Karen will still be available to work on this. I am resetting the assignee from "Galen" to default, marking this as NEW for now.

Note: The behaviour of $a and $t described here might be something specific to our data export as I have recently learned. Changing it won't hurt anyone, but it might not generally apply.

::: koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl
@@ +603,5 @@
>      <span class="label">Source: </span>
>              <xsl:value-of select="marc:subfield[@code='t']"/>
> +     </span> 
> +            </xsl:if>
> +            <xsl:if test="marc:subfield[@code='a']">

I think this condition needs to be modified to check if either a or t exist in order to decide if the label should be displayed.
Comment 6 Heather 2019-06-13 17:22:00 UTC
I am not understanding this completely.  A 245 field is mandatory in a MARC21 bib record, therefore all records to which a 773 would link have at least a 245.  It is correct that not all bib records have a 100, 110, or 111 main entry to go into the 773 $a, and that these records may then only have a 245 (title main entry) or a 130 uniform title main entry.  However, when a bib record to which the 773 should link has a 130, that data does not go into the 773 $a, but goes into the $t.  From:
https://www.loc.gov/marc/bibliographic/bd76x78x.html
"$t - Title
Title information from subfields $a, $f, $g, $k, $n, and $p of fields 130 (Main Entry - Uniform Title) and 245 (Title Statement) of the related record."

The 773 $a (from that same website) can only contain data from the related record's 100, 110, or 111--name or meeting name fields, not title fields:
"$a - Main entry heading
Main entry heading data (without the content designators) from field 100 (Main Entry-Personal Name), 110 (Main Entry-Corporate Name), or 111 (Main Entry-Meeting Name) in the related record."

Am I missing something or misreading what is meant here by intending to put the related record's title data into a 773 $a?
Comment 7 Katrin Fischer 2019-06-18 22:04:14 UTC
(In reply to Heather from comment #6)
> I am not understanding this completely.  A 245 field is mandatory in a
> MARC21 bib record, therefore all records to which a 773 would link have at
> least a 245.  It is correct that not all bib records have a 100, 110, or 111
> main entry to go into the 773 $a, and that these records may then only have
> a 245 (title main entry) or a 130 uniform title main entry.  However, when a
> bib record to which the 773 should link has a 130, that data does not go
> into the 773 $a, but goes into the $t. 

And you are completely right there, Heather! :) It was an error in our MARC21 export from the union catalog. I think what happened was that $a was understood to always contain the 'main heading', so when there was no other 100 the title got put into $a. It has since been changed.

That said... could it be nice to also show 773$a and possibly other subfields? Thinking especially about $g etc.
Comment 8 Heather 2019-06-20 16:08:00 UTC
If present, I think all the subfields should be displayed since they show the exact location within the host item of the analyzed title, with the $w record number hyperlinked to execute a search to retrieve the exact record containing the record number--I'm working on a support ticket with ByWater for this, but it's very complicated since the format for record numbers in the 7XX linking entry fields doesn't exactly match how the record numbers are stored in, e.g., 001.
Comment 9 Katrin Fischer 2020-01-11 19:53:25 UTC
*** Bug 19606 has been marked as a duplicate of this bug. ***