Bugzilla – Attachment 120808 Details for
Bug 23406
When using an authorised value for suppression, record doesn't show as suppressed in staff interface
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23406: Don't translate suppressed authorised values
Bug-23406-Dont-translate-suppressed-authorised-val.patch (text/plain), 2.13 KB, created by
Katrin Fischer
on 2021-05-10 20:32:21 UTC
(
hide
)
Description:
Bug 23406: Don't translate suppressed authorised values
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2021-05-10 20:32:21 UTC
Size:
2.13 KB
patch
obsolete
>From c1acf1f014af2633b66ad27f54c33112b71b59f9 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Mon, 10 May 2021 12:14:08 +0000 >Subject: [PATCH] Bug 23406: Don't translate suppressed authorised values > >We have a test in C4/XSLT/transformMARCXML4HTML which is meant to exclude the 942n, however, >it doesn't work because it checks the $subfield parameter against n > >$subfield is an arrayref with the code and value as members > >we need to check $subfield->[0] > >To test: > 1 - Apply only unit tests > 2 - prove -v t/db_dependent/XSLT.t > 3 - It fails > 4 - Confirm 952$n in default framework is tied ot authorised value 'YES_NO' or do so > 5 - Set OpacSuppression to 'Hide' > 6 - Edit a record in the default template, changing 942$n to 'Yes > 7 - Confirm the record is suppressed in opac > 8 - Note there is no suppression notice in the record in staff client > 9 - Apply second patch >10 - Reload and confirm staff side shows suppression notice >11 - Confirm record still suppressed in OPAC >12 - Edit record, set 942$n to 'no' >13 - Confirm there is no suppression notice in staff client >14 - Confirm you can view the record in OPAC >15 - prove -v t/db_dependent/XSLT.t >16 - Tests pass! > >Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > C4/XSLT.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/XSLT.pm b/C4/XSLT.pm >index d4cdb832cd..3cdf451b28 100644 >--- a/C4/XSLT.pm >+++ b/C4/XSLT.pm >@@ -84,7 +84,7 @@ sub transformMARCXML4XSLT { > for my $subfield ( $field->subfields() ) { > my ( $letter, $value ) = @$subfield; > # Replace the field value with the authorised value *except* for MARC21/NORMARC field 942$n (suppression in opac) >- if ( !( $tag eq '942' && $subfield eq 'n' ) || $marcflavour eq 'UNIMARC' ) { >+ if ( !( $tag eq '942' && $subfield->[0] eq 'n' ) || $marcflavour eq 'UNIMARC' ) { > $value = GetAuthorisedValueDesc( $tag, $letter, $value, '', $tagslib ) > if $av->{ $tag }->{ $letter }; > } >-- >2.11.0
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 23406
:
120213
|
120719
|
120772
|
120773
|
120803
|
120804
|
120807
| 120808