Browse Source

Bug 23844: Check if field defined in framework and specify 'Default' for framework

To test:
1 - Go to Cataloguing
2 - New from Z3950
3 - Find an import a record
4 - Check the plack logs:
Use of uninitialized value in string ne at /kohadevbox/koha/cataloguing/addbiblio.pl line 565.
Use of uninitialized value in string ne at /kohadevbox/koha/cataloguing/addbiblio.pl line 580.
Use of uninitialized value $frameworkcode in string eq at /kohadevbox/koha/cataloguing/addbiblio.pl line 711.
Use of uninitialized value $frameworkcode in string eq at /kohadevbox/koha/cataloguing/addbiblio.pl line 715.
Use of uninitialized value $frameworkcode in string eq at /kohadevbox/koha/cataloguing/addbiblio.pl line 734.
5 - Apply patch
6 - Repeat
7 - No new errors
8 - Confirm selecting 'Default' from 'New from Z3950' dropdown also generates no errors

Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
20.05.x
Nick Clemens 3 years ago
committed by Martin Renvoize
parent
commit
445a97d8d2
Signed by: martin.renvoize GPG Key ID: 422B469130441A0F
  1. 2
      cataloguing/addbiblio.pl
  2. 4
      koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt

2
cataloguing/addbiblio.pl

@ -559,7 +559,7 @@ sub build_tabs {
my $subfield = $subfields[$subfieldcount][0];
my $value = $subfields[$subfieldcount][1];
next if ( length $subfield != 1 );
next if ( $tagslib->{$tag}->{$subfield}->{tab} ne $tabloop );
next if ( !defined $tagslib->{$tag}->{$subfield} || $tagslib->{$tag}->{$subfield}->{tab} ne $tabloop );
push(
@subfields_data,
&create_input(

4
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt

@ -37,7 +37,7 @@
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li class="z3950searchFw"><a href="#">Default framework</a></li>
<li id="Default" class="z3950searchFw"><a href="#">Default framework</a></li>
[% FOREACH framework IN frameworks %]
<li id="[% framework.frameworkcode | html %]" class="z3950searchFw"><a href="#">[% framework.frameworktext | html %]</a></li>
[% END %]
@ -227,7 +227,7 @@
$("input[name=q]:eq(0)").focus();
$("#z3950search").click(function(){
PopupZ3950("");
PopupZ3950("Default");
return false;
});

Loading…
Cancel
Save