@@ -, +, @@ --- cataloguing/additem.pl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) --- a/cataloguing/additem.pl +++ a/cataloguing/additem.pl @@ -413,6 +413,7 @@ my $prefillitem = C4::Context->preference('PrefillItem'); if ($op eq "additem") { my $add_submit = $input->param('add_submit'); + my $add_duplicate_submit = $input->param('add_duplicate_submit'); my $add_multiple_copies_submit = $input->param('add_multiple_copies_submit'); my $number_of_copies = $input->param('number_of_copies'); @@ -488,7 +489,7 @@ if ($op eq "additem") { } # If we have to add & duplicate - if ($prefillitem) { + if ($prefillitem || $add_duplicate_submit) { $current_item = $item->unblessed; @@ -500,6 +501,10 @@ if ($op eq "additem") { # we have to clear the barcode field in the duplicate item record to make way for the new one generated by the javascript plugin $current_item->{barcode} = undef; # FIXME or delete? } + + # Don't use the "prefill" feature if we want to generate the form with all the info from this item + # It will remove subfields that are not in SubfieldsToUseWhenPrefill. + $prefillitem = 0 if $add_duplicate_submit; } # If we have to add multiple copies --