Bug 8791 - OPAC UNIMARC XSLT details : subject with subfield 3
Summary: OPAC UNIMARC XSLT details : subject with subfield 3
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: 3.8
Hardware: All All
: P5 - low normal
Assignee: Fridolin Somers
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-19 09:43 UTC by Fridolin Somers
Modified: 2013-05-23 06:24 UTC (History)
3 users (show)

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


Attachments
Proposed patch (1.58 KB, patch)
2012-09-19 09:46 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 8791: OPAC UNIMARC XSLT details: subject with subfield 3 (1.85 KB, patch)
2012-10-04 16:41 UTC, Frédéric Demians
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2012-09-19 09:43:09 UTC
On OPAC details page with XSLT, when a subject field has $3, $9 and other subfields, $9 is displayed instead of other subfields.

Example :
  <datafield tag="606" ind1=" " ind2=" ">
    <subfield code="9">331978</subfield>
    <subfield code="3">027214724</subfield>
    <subfield code="a">Revolution</subfield>
  </datafield>

This comes from UNIMARCslimUtils.xsl tag_onesubject template :
Subfields $2 and $3 stops the display variable computing.

Without XSLT, subjects are displayed with only non-numerical subfields [a-zA-Z]. So $2 and $3 should just be avoid in display var.

Example should be displayed :
  <a href="/cgi-bin/koha/opac-search.pl?q=an:331978">Revolution</a>
Comment 1 Fridolin Somers 2012-09-19 09:46:25 UTC Comment hidden (obsolete)
Comment 2 Frédéric Demians 2012-10-04 16:33:25 UTC
> Example :
>   <datafield tag="606" ind1=" " ind2=" ">
>     <subfield code="9">331978</subfield>
>     <subfield code="3">027214724</subfield>
>     <subfield code="a">Revolution</subfield>
>   </datafield>

For me such a field is properly displayed with the current UNIMARC XSL. Could you provide a complete sample record (in ISO2709)?
Comment 3 Frédéric Demians 2012-10-04 16:35:14 UTC
Sorry I was wrong! I was testing with your patch already applied!
Comment 4 Frédéric Demians 2012-10-04 16:41:36 UTC
Created attachment 12687 [details] [review]
Bug 8791: OPAC UNIMARC XSLT details: subject with subfield 3

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>

I can reproduce the bug, and confirm that this patch fix it. The issue arises
when $9 come first, and then $3, which is not that usual.
Comment 5 Paul Poulain 2012-10-12 21:01:47 UTC
QA comment
 * tiny fix
 * UNIMARC XSLT related only, no side-effect risk
 * koha-qa.pl OK

passed QA
Comment 6 Paul Poulain 2012-10-12 21:03:59 UTC
Patch pushed to master
Comment 7 Chris Cormack 2012-10-17 19:44:06 UTC
No string changes pushed to 3.8.x, will be in 3.8.6