From 9276e70739752c36bd1f4a49482113f931874997 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 10 Dec 2015 12:30:00 +0000 Subject: [PATCH] [PASSED QA] Bug 14377 [QA Followup] - Use true value description for authorised value Signed-off-by: Kyle M Hall Signed-off-by: Katrin Fischer --- C4/XSLT.pm | 19 +++++++++++++++++-- .../prog/en/xslt/MARC21slim2intranetDetail.xsl | 3 ++- .../prog/en/xslt/MARC21slim2intranetResults.xsl | 3 ++- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/C4/XSLT.pm b/C4/XSLT.pm index dd13c50..14976e4 100644 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -85,8 +85,8 @@ sub transformMARCXML4XSLT { $value = GetAuthorisedValueDesc( $tag, $letter, $value, '', $tagslib ) if $av->{ $tag }->{ $letter }; push( @new_subfields, $letter, $value ); - } - $field ->replace_with( MARC::Field->new( + } + $field->replace_with( MARC::Field->new( $tag, $field->indicator(1), $field->indicator(2), @@ -219,6 +219,21 @@ sub XSLTParse4Display { $sysxml .= "$singleBranchMode\n"; $sysxml .= "\n"; + + ## Non-syspref variables that need to be computed + $sysxml .= ""; + + # Fetch the authorised value description for 942$n ( supressed in opac ) for the value '1' + # if 942$n is not mapped, the return value will be '1' which means even if the field is not + # mapped in the framework, we will still get the correct value to compare against + my $frameworkcode = GetFrameworkCode($biblionumber) || ''; + my $tagslib = &GetMarcStructure(1,$frameworkcode); + my $value = GetAuthorisedValueDesc( '942', 'n', '1', '', $tagslib ); + $sysxml .= "$value"; + + $sysxml .= "\n"; + ## End non-syspref variables that need to be computed + $xmlrecord =~ s/\<\/record\>/$itemsxml$sysxml\<\/record\>/; if ($fixamps) { # We need to correct the HTML entities that Zebra outputs $xmlrecord =~ s/\&amp;/\&/g; diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl index 873db93..b318eb5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl @@ -91,7 +91,8 @@ - + + - Suppressed in OPAC diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl index 2019142..e3513c1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl @@ -282,7 +282,8 @@ - + + - Suppressed in OPAC -- 1.9.1