Bug 35382 - Possibly unreasonable condition for showing "Set" row in biblio marc detail template (checking character in leader field instead of presence of 773 field)
Summary: Possibly unreasonable condition for showing "Set" row in biblio marc detail t...
Status: RESOLVED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-22 08:49 UTC by Michał
Modified: 2023-11-27 18:02 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał 2023-11-22 08:49:18 UTC
In these two places for opac/intranet:
- https://github.com/Koha-Community/Koha/blob/f587d0a3620c94d4777fff8506b56f2456a88a8e/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl#L300-L303
- https://github.com/Koha-Community/Koha/blob/f587d0a3620c94d4777fff8506b56f2456a88a8e/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl#L258-L261

```
<!-- Set -->
<xsl:if test="$leader19='c'">
<span class="results_summary set"><span class="label">Set: </span>
<xsl:for-each select="marc:datafield[@tag=773]">
```

it is tested whether 19th character of leader equals "c" in order to display "Set:" row enlisting contents of field 773.

Is this reasonable and expected behavior?

A librarian has pointed this out to me asking what makes this field appear while it's empty and none of the normal fields seem to suggest its appearance, and I found this out. But I wasn't able to find out the reasoning for this check, given it was already there the very moment the file was created to begin with 11 years ago.

I think it would be more reasonable to show this and enlist Sets only if there are non-zero occurences of field 773, right?

And the condition checks arbitrary character in leader field instead, which I'm not entirely sure if it's standardised either, given our source of biblio records had the field there defined, but no 773 fields. And the other way around, we found records where field 773 was expected and present, but the "c" character condition wasn't fulfilled then on the other hand!

So I suggest that this check should be replaced by a check for whether there's any 773 fields.

Also, take a look at other occurences of $leader19 var, it's checked to show "Set" somewhere above where the field is... "a" on the other hand? While in our bibliographic records with field 773, that character instead seemed to be a space.
Comment 1 Katrin Fischer 2023-11-27 18:00:12 UTC
There are different use cases for 773. 

In this case we are not talking about an article, but about a part/volume record. The 773 in this case doesn't contain $t and we handle it accordingly by using a part of the 245 for display.

For an article we create a link with the label In: and check for other markers.

The check is there fully intentionally and required.
Comment 2 Katrin Fischer 2023-11-27 18:02:25 UTC
Look for other occurences of 773 for articles. If you records are missing the markers, consider adding them. Koha will work better if your leaders are correct. If this is not an option, adaption the XSLT for your data might be another. You can have your own custom XSLT files.