fix for 13331 [Bug 13331] Subfield does not show in cataloging editor - if subfield...
authorMason James <mtj@kohaaloha.com>
Wed, 26 Nov 2014 00:51:45 +0000 (13:51 +1300)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Wed, 17 Dec 2014 22:50:54 +0000 (19:50 -0300)
to test...

1/ attempt to add a new bib in the cataloguing editor, default framewok
  - observe 245b subfield is visible in the editor, for tab 2

2/ uncheck the OPAC visibility for 245b, within the framework editor - then save

3/ repeat step 1/
  - observe that the 245b subfield has disappeared from the cataloguing editor!

4/ apply patch,

5/ repeat step 1/
  - observe that the 245b subfield now displays correctly in the cataloguing editor

note: this looks looks like a typo bug, that has been in koha for years

Signed-off-by: wajasu <matted@34813.mypacks.net>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

cataloguing/addbiblio.pl

index 5b06706..645a30a 100755 (executable)
@@ -653,8 +653,8 @@ sub build_tabs {
                 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 ) )
+                      if ( ( $tagslib->{$tag}->{$subfield}->{hidden} <= -4 )
+                        or ( $tagslib->{$tag}->{$subfield}->{hidden} >= 5 ) )
                       and not ( $subfield eq "9" and
                                 exists($tagslib->{$tag}->{'a'}->{authtypecode}) and
                                 defined($tagslib->{$tag}->{'a'}->{authtypecode}) and