[Koha-bugs] [Bug 35382] New: Possibly unreasonable condition for showing "Set" row in biblio marc detail template (checking character in leader field instead of presence of 773 field)

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Nov 22 09:49:18 CET 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35382

            Bug ID: 35382
           Summary: Possibly unreasonable condition for showing "Set" row
                    in biblio marc detail template (checking character in
                    leader field instead of presence of 773 field)
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P5 - low
         Component: Templates
          Assignee: oleonard at myacpl.org
          Reporter: schodkowy.omegi-0r at icloud.com
        QA Contact: testopia at bugs.koha-community.org

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.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list