Bug 21808: Field 711 is not handled correctly in showAuthor XSLT for relator term...
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Mon, 12 Nov 2018 10:48:23 +0000 (11:48 +0100)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 15 Feb 2019 07:04:58 +0000 (08:04 +0100)
The test should check $4 or $e for fields ne 111,711.
And should check $4 or $j for 111,711.

Test plan:
Edit a record, add a meeting in 711 without $4 but with $j.
Without this patch the term is not visible, with this patch it is.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6179f23dd8b4ed24add2e76c7b8e193372052201)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9199083de8637d96148b873cc745c1a81fe78d01)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7ce9ac1f7deb6ab016256be3f068ffd342b84eef)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl
koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl

index e08ccd6..b388f86 100644 (file)
 
     <!-- add relator code too between brackets-->
     <!-- #13383 include relator code j for field 111 -->
-            <xsl:if test="marc:subfield[@code='4' or @code='e'][not(parent::*[@tag=111])] or (self::*[@tag=111] and marc:subfield[@code='4' or @code='j'][. != ''])">
+            <xsl:if test="(@tag!=111 and @tag!=711 and marc:subfield[@code='4' or @code='e']) or ((@tag=111 or @tag=711) and marc:subfield[@code='4' or @code='j'])">
                 <span class="relatorcode">
                     <xsl:text> [</xsl:text>
                     <xsl:choose>
index 196d709..7da26db 100644 (file)
                 </span></span></span>
 
                 <!-- #13383 include relator code j for field 111 also include 711$e 'Subordinate unit' -->
-                <xsl:if test="marc:subfield[@code='4' or @code='e'][not(parent::*[@tag=111])] or (self::*[@tag=111] and marc:subfield[@code='4' or @code='j'][. != ''])">
+                <xsl:if test="(@tag!=111 and @tag!=711 and marc:subfield[@code='4' or @code='e']) or ((@tag=111 or @tag=711) and marc:subfield[@code='4' or @code='j'])">
 
                     <span class="relatorcode">
                         <xsl:text> [</xsl:text>