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>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
build_authorized_values_list( $tag, $subfield, $value, $dbh,
$authorised_values_sth,$index_tag,$index_subfield );
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
}
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},
$subfield_data{marc_value} = {
type => 'text',
id => $subfield_data{id},
and not ( $subfield eq "9" and
exists($tagslib->{$tag}->{'a'}->{authtypecode}) and
defined($tagslib->{$tag}->{'a'}->{authtypecode}) and
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,
)
; #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,
next if ( defined( $field->subfield($subfield) ) );
push(
@subfields_data,
and not ( $subfield->{subfield} eq "9" and
exists($tagslib->{$tag}->{'a'}->{authtypecode}) and
defined($tagslib->{$tag}->{'a'}->{authtypecode}) and
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,
)
; #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(
next
if ( $subfield->{tab} ne $tabloop );
push(