Bug 29662: (bug 27526 follow-up) Prefill all subfields if SubfieldsToUseWhenPrefill...
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 13 Dec 2021 10:50:33 +0000 (11:50 +0100)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 21 Oct 2022 14:34:01 +0000 (11:34 -0300)
Signed-off-by: Thibault Keromnès <thibault.keromnes@univ-paris8.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/UI/Form/Builder/Item.pm
cataloguing/additem.pl

index 429f88c..568a00e 100644 (file)
@@ -429,6 +429,8 @@ Flag to restrict the edition if the user does not have necessary permissions.
 
 List of subfields to prefill (value of syspref SubfieldsToUseWhenPrefill)
 
+If empty all subfields will be prefilled. For none, you can pass an array with a single false value.
+
 =item subfields_to_allow
 
 List of subfields to allow (value of syspref SubfieldsToAllowForRestrictedBatchmod or SubfieldsToAllowForRestrictedEditing)
index bdd2061..4617cb5 100755 (executable)
@@ -607,8 +607,6 @@ my $branchcode = $input->param('branch') || C4::Context->userenv->{branch};
 my @subfields_to_prefill;
 if ( $nextop eq 'additem' && $op ne 'dupeitem' && $prefillitem ) {
     @subfields_to_prefill = split(' ', C4::Context->preference('SubfieldsToUseWhenPrefill'));
-    # Setting to 1 element if SubfieldsToUseWhenPrefill is empty to prevent all the subfields to be prefilled
-    @subfields_to_prefill = ("") unless @subfields_to_prefill;
 }
 
 # Getting list of subfields to keep when restricted editing is enabled