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

(-)a/Koha/UI/Form/Builder/Item.pm (-1 / +1 lines)
Lines 454-460 Flag to add an empty option to the library list. Link Here
454
454
455
=item ignore_non_mandatory_invisible_subfields
455
=item ignore_non_mandatory_invisible_subfields
456
456
457
Skip the subfields that are not visible on the editor.
457
Skip the non mandatory subfields that are not visible in the editor.
458
458
459
When duplicating an item we do not want to retrieve the subfields that are hidden.
459
When duplicating an item we do not want to retrieve the subfields that are hidden.
460
460
(-)a/t/db_dependent/Koha/UI/Form/Builder/Item.t (-4 / +3 lines)
Lines 325-331 subtest 'subfields_to_allow & ignore_not_allowed_subfields' => sub { Link Here
325
    is( $subfield, undef, "subfield that is not in the allow list is not returned" );
325
    is( $subfield, undef, "subfield that is not in the allow list is not returned" );
326
};
326
};
327
327
328
subtest 'ignore_invisible_subfields' => sub {
328
subtest 'ignore_non_mandatory_invisible_subfields' => sub {
329
    plan tests => 2;
329
    plan tests => 2;
330
330
331
    my $biblio =
331
    my $biblio =
Lines 351-361 subtest 'ignore_invisible_subfields' => sub { Link Here
351
            biblionumber => $biblio->biblionumber,
351
            biblionumber => $biblio->biblionumber,
352
            item         => $item->unblessed,
352
            item         => $item->unblessed,
353
        }
353
        }
354
    )->edit_form( { ignore_invisible_subfields => 1 } );
354
    )->edit_form( { ignore_non_mandatory_invisible_subfields => 1 } );
355
    ($subfield) = grep { $_->{subfield} eq 'l' } @$subfields;
355
    ($subfield) = grep { $_->{subfield} eq 'l' } @$subfields;
356
    is(
356
    is(
357
        $subfield->{marc_value}->{value},
357
        $subfield->{marc_value}->{value},
358
        undef, 'items.issues not copied if ignore_invisible_subfields is passed'
358
        undef, 'items.issues not copied if ignore_non_mandatory_invisible_subfields is passed'
359
    );
359
    );
360
};
360
};
361
361
362
- 

Return to bug 40869