View | Details | Raw Unified | Return to bug 31154
Collapse All | Expand All

(-)a/Koha/UI/Form/Builder/Item.pm (-3 / +3 lines)
Lines 162-168 sub generate_subfield_form { Link Here
162
            my $CNsubfields =
162
            my $CNsubfields =
163
              substr( $pref_itemcallnumber_part, 3 );    # Any and all subfields
163
              substr( $pref_itemcallnumber_part, 3 );    # Any and all subfields
164
            $CNsubfields = undef if $CNsubfields eq '';
164
            $CNsubfields = undef if $CNsubfields eq '';
165
            my $temp2 = $marc_record->field($CNtag);
165
            my $temp2 = $marc_record ? $marc_record->field($CNtag) : undef;
166
166
167
            next unless $temp2;
167
            next unless $temp2;
168
            $value = $temp2->as_string( $CNsubfields, ' ' );
168
            $value = $temp2->as_string( $CNsubfields, ' ' );
Lines 314-320 sub generate_subfield_form { Link Here
314
        );
314
        );
315
        my $pars = {
315
        my $pars = {
316
            dbh     => $dbh,
316
            dbh     => $dbh,
317
            record  => $marc_record,
317
            record  => $marc_record, #Note: could be undefined
318
            tagslib => $tagslib,
318
            tagslib => $tagslib,
319
            id      => $subfield_data{id},
319
            id      => $subfield_data{id},
320
        };
320
        };
Lines 564-570 sub edit_form { Link Here
564
                        value              => $value,
564
                        value              => $value,
565
                        tagslib            => $tagslib,
565
                        tagslib            => $tagslib,
566
                        libraries          => $libraries,
566
                        libraries          => $libraries,
567
                        marc_record        => $marc_record,
567
                        marc_record        => $marc_record, #Note: could be undefined
568
                        restricted_edition => $restricted_edition,
568
                        restricted_edition => $restricted_edition,
569
                        prefill_with_default_values => $prefill_with_default_values,
569
                        prefill_with_default_values => $prefill_with_default_values,
570
                        branch_limit       => $branch_limit,
570
                        branch_limit       => $branch_limit,
(-)a/tools/batchMod.pl (-4 / +1 lines)
Lines 265-273 if ($op eq "show"){ Link Here
265
    # Getting list of subfields to keep when restricted batchmod edit is enabled
265
    # Getting list of subfields to keep when restricted batchmod edit is enabled
266
    my @subfields_to_allow = $restrictededition ? split ' ', C4::Context->preference('SubfieldsToAllowForRestrictedBatchmod') : ();
266
    my @subfields_to_allow = $restrictededition ? split ' ', C4::Context->preference('SubfieldsToAllowForRestrictedBatchmod') : ();
267
267
268
    $biblionumber = Koha::Items->find($itemnumbers[0])->unblessed->{biblionumber} if $itemnumbers[0];
268
    my $subfields = Koha::UI::Form::Builder::Item->new->edit_form( # NOTE: We are not passing a biblionumber intentionally !
269
    my $subfields = Koha::UI::Form::Builder::Item->new(
270
        { biblionumber => $biblionumber } )->edit_form(
271
        {
269
        {
272
            restricted_editition => $restrictededition,
270
            restricted_editition => $restrictededition,
273
            (
271
            (
274
- 

Return to bug 31154