Bugzilla – Attachment 66708 Details for
Bug 18811
Visibility settings inconsistent between framework and authority editor
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18811: Change visibility checks in authorities.pl
Bug-18811-Change-visibility-checks-in-authoritiesp.patch (text/plain), 3.60 KB, created by
Nick Clemens (kidclamp)
on 2017-09-01 11:19:33 UTC
(
hide
)
Description:
Bug 18811: Change visibility checks in authorities.pl
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2017-09-01 11:19:33 UTC
Size:
3.60 KB
patch
obsolete
>From 4147654dde86d1938dba9921458602fc463ce6a3 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 15 Jun 2017 12:30:27 +0200 >Subject: [PATCH] Bug 18811: Change visibility checks in authorities.pl > >The check is now <=-4 or >=5, but the framework uses 0 for Show all and >-5 for Hide all. (Note that sql installer scripts also use 8.) >When modifying an authority, the script also showed hidden fields when >filled, since it did not check the hidden field but only the tab field. > >NOTE: The proposed solution restores consistency, but will remove hidden >fields from the MARC record. > >Test plan: >[1] Set field 942a to Show all in an authority framework. >[2] Open a new record in this framework and verify that you see 942a. >[3] Edit an existing record in this framework and verify again. >[4] Set field 942a now to Hide all in this framework. >[5] Open a new record in this framework and verify that 942a is hidden. >[6] Edit an existing record in this framework and verify again. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > authorities/authorities.pl | 11 ++++------- > 1 file changed, 4 insertions(+), 7 deletions(-) > >diff --git a/authorities/authorities.pl b/authorities/authorities.pl >index e45f5dd..5935b07 100755 >--- a/authorities/authorities.pl >+++ b/authorities/authorities.pl >@@ -404,6 +404,7 @@ sub build_tabs { > $subfield = '@'; > } > next if ( $tagslib->{$tag}->{$subfield}->{tab} ne $tabloop ); >+ next if $tagslib->{$tag}->{$subfield}->{hidden}; > push( > @subfields_data, > &create_input( >@@ -419,6 +420,7 @@ sub build_tabs { > my $value = $subfields[$subfieldcount][1]; > next if ( length $subfield != 1 ); > next if ( $tagslib->{$tag}->{$subfield}->{tab} ne $tabloop ); >+ next if $tagslib->{$tag}->{$subfield}->{hidden}; > push( > @subfields_data, > &create_input( >@@ -435,10 +437,7 @@ sub build_tabs { > next if ( length $subfield != 1 ); > next if ( $tagslib->{$tag}->{$subfield}->{tab} ne $tabloop ); > next if ( $tag < 10 ); >- next >- if ( ( $tagslib->{$tag}->{$subfield}->{hidden} <= -4 ) >- or ( $tagslib->{$tag}->{$subfield}->{hidden} >= 5 ) >- ); #check for visibility flag >+ next if $tagslib->{$tag}->{$subfield}->{hidden}; > next if ( defined( $field->subfield($subfield) ) ); > push( > @subfields_data, >@@ -477,9 +476,7 @@ sub build_tabs { > my @subfields_data; > foreach my $subfield ( sort( keys %{ $tagslib->{$tag} } ) ) { > next if ( length $subfield != 1 ); >- next if ( ( $tagslib->{$tag}->{$subfield}->{hidden} <= -5 ) >- or ( $tagslib->{$tag}->{$subfield}->{hidden} >= 4 ) ) >- ; #check for visibility flag >+ next if $tagslib->{$tag}->{$subfield}->{hidden}; > next if ( $tagslib->{$tag}->{$subfield}->{tab} ne $tabloop ); > push( > @subfields_data, >-- >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 18811
:
64314
|
64541
|
64542
|
64570
|
64571
|
64572
|
64573
|
66309
|
66310
|
66311
|
66312
| 66708 |
66709
|
66710
|
66711
|
66793
|
66794
|
70614