Bugzilla – Attachment 119903 Details for
Bug 28022
MARC subfield 9 not honoring visibility
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28022: Only show subfield "9" if subfield "a" is visible
Bug-28022-Only-show-subfield-9-if-subfield-a-is-vi.patch (text/plain), 3.72 KB, created by
Martin Renvoize (ashimema)
on 2021-04-20 10:59:18 UTC
(
hide
)
Description:
Bug 28022: Only show subfield "9" if subfield "a" is visible
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-04-20 10:59:18 UTC
Size:
3.72 KB
patch
obsolete
>From 81f30bb484cf0d69dff1f5b5fb83f442841cf298 Mon Sep 17 00:00:00 2001 >From: Thomas Klausner <domm@plix.at> >Date: Mon, 29 Mar 2021 13:59:50 +0200 >Subject: [PATCH] Bug 28022: Only show subfield "9" if subfield "a" is visible > >Amend the workaround (from but 2206) to only show subfield "9" in editor if >subfield "a" has the editor-visibility bit set. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > cataloguing/addbiblio.pl | 19 ++++++++++++------- > 1 file changed, 12 insertions(+), 7 deletions(-) > >diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl >index 7eba09f55d..1e983883c4 100755 >--- a/cataloguing/addbiblio.pl >+++ b/cataloguing/addbiblio.pl >@@ -343,13 +343,14 @@ sub create_input { > build_authorized_values_list( $tag, $subfield, $value, $dbh, > $authorised_values_sth,$index_tag,$index_subfield ); > >- # it's a subfield $9 linking to an authority record - see bug 2206 >+ # it's a subfield $9 linking to an authority record - see bug 2206 and 28022 > } > elsif ($subfield eq "9" and > exists($tagslib->{$tag}->{'a'}->{authtypecode}) and > defined($tagslib->{$tag}->{'a'}->{authtypecode}) and >- $tagslib->{$tag}->{'a'}->{authtypecode} ne '') { >- >+ $tagslib->{$tag}->{'a'}->{authtypecode} ne '' and >+ $tagslib->{$tag}->{'a'}->{hidden} > -4 and >+ $tagslib->{$tag}->{'a'}->{hidden} < 5) { > $subfield_data{marc_value} = { > type => 'text', > id => $subfield_data{id}, >@@ -591,11 +592,13 @@ sub build_tabs { > and not ( $subfield eq "9" and > exists($tagslib->{$tag}->{'a'}->{authtypecode}) and > defined($tagslib->{$tag}->{'a'}->{authtypecode}) and >- $tagslib->{$tag}->{'a'}->{authtypecode} ne "" >+ $tagslib->{$tag}->{'a'}->{authtypecode} ne "" and >+ $tagslib->{$tag}->{'a'}->{hidden} > -4 and >+ $tagslib->{$tag}->{'a'}->{hidden} < 5 > ) > ; #check for visibility flag > # if subfield is $9 in a field whose $a is authority-controlled, >- # always include in the form regardless of the hidden setting - bug 2206 >+ # always include in the form regardless of the hidden setting - bug 2206 and 28022 > next if ( defined( $field->subfield($subfield) ) ); > push( > @subfields_data, >@@ -644,11 +647,13 @@ sub build_tabs { > and not ( $subfield->{subfield} eq "9" and > exists($tagslib->{$tag}->{'a'}->{authtypecode}) and > defined($tagslib->{$tag}->{'a'}->{authtypecode}) and >- $tagslib->{$tag}->{'a'}->{authtypecode} ne "" >+ $tagslib->{$tag}->{'a'}->{authtypecode} ne "" and >+ $tagslib->{$tag}->{'a'}->{hidden} > -4 and >+ $tagslib->{$tag}->{'a'}->{hidden} < 5 > ) > ; #check for visibility flag > # if subfield is $9 in a field whose $a is authority-controlled, >- # always include in the form regardless of the hidden setting - bug 2206 >+ # always include in the form regardless of the hidden setting - bug 2206 and 28022 > next > if ( $subfield->{tab} ne $tabloop ); > push( >-- >2.20.1
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 28022
:
119123
|
119903
|
124768