Bugzilla – Attachment 50361 Details for
Bug 14377
Indicate that a record is suppressed in staff client
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14377 - Don't replace 942$n with authorised value except when using UNIMARC
Bug-14377---Dont-replace-942n-with-authorised-valu.patch (text/plain), 1.65 KB, created by
Kyle M Hall (khall)
on 2016-04-18 17:31:26 UTC
(
hide
)
Description:
Bug 14377 - Don't replace 942$n with authorised value except when using UNIMARC
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2016-04-18 17:31:26 UTC
Size:
1.65 KB
patch
obsolete
>From 738761c866bc439c624e2a19639e5bfab5e272c3 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 18 Apr 2016 17:28:36 +0000 >Subject: [PATCH] Bug 14377 - Don't replace 942$n with authorised value except > when using UNIMARC > >--- > C4/XSLT.pm | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > >diff --git a/C4/XSLT.pm b/C4/XSLT.pm >index dd13c50..f1cd8fb 100644 >--- a/C4/XSLT.pm >+++ b/C4/XSLT.pm >@@ -75,6 +75,7 @@ sub transformMARCXML4XSLT { > @fields = $record->fields(); > }; > if ($@) { warn "PROBLEM WITH RECORD"; next; } >+ my $marcflavour = C4::Context->preference('marcflavour'); > my $av = getAuthorisedValues4MARCSubfields($frameworkcode); > foreach my $tag ( keys %$av ) { > foreach my $field ( $record->field( $tag ) ) { >@@ -82,8 +83,11 @@ sub transformMARCXML4XSLT { > my @new_subfields = (); > for my $subfield ( $field->subfields() ) { > my ( $letter, $value ) = @$subfield; >- $value = GetAuthorisedValueDesc( $tag, $letter, $value, '', $tagslib ) >- if $av->{ $tag }->{ $letter }; >+ # Replace the field value with the authorised value *except* for 942$n ( record supression ) >+ if ( $tag ne '942' && $subfield ne 'n' && $marcflavour ne 'UNIMARC' ) { >+ $value = GetAuthorisedValueDesc( $tag, $letter, $value, '', $tagslib ) >+ if $av->{ $tag }->{ $letter }; >+ } > push( @new_subfields, $letter, $value ); > } > $field ->replace_with( MARC::Field->new( >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14377
:
42424
|
42436
|
42709
|
43026
|
45564
|
45565
|
45566
|
45568
|
46900
|
46993
|
48657
|
48658
|
48659
|
48660
|
48661
|
49718
|
49719
|
49720
|
49721
|
49722
|
50360
|
50361
|
50720
|
50721
|
50839
|
50842
|
50843
|
50844
|
50881
|
50882
|
50883
|
50884
|
50885
|
50987