Bug 8791

Summary: OPAC UNIMARC XSLT details : subject with subfield 3
Product: Koha Reporter: Fridolin Somers <fridolin.somers>
Component: OPACAssignee: Fridolin Somers <fridolin.somers>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P5 - low CC: chris, frederic, paul.poulain
Version: 3.8   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6314
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Proposed patch
Bug 8791: OPAC UNIMARC XSLT details: subject with subfield 3

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