From 1fa2afe44bbec0fd2ae0d34f30488fe6b9b9835d Mon Sep 17 00:00:00 2001 From: Andrew Nugged Date: Thu, 28 Oct 2021 00:22:28 +0300 Subject: [PATCH] Bug 27526: Fix for prefill preventing duplication 2 Prefill feature should not be in the priority when user choose "Duplicate" for the item Signed-off-by: Jonathan Druart --- cataloguing/additem.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index c2eef2ba6f..80e17abda3 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -565,7 +565,7 @@ my $branchcode = $input->param('branch') || C4::Context->userenv->{branch}; # OR # If the subfield must be prefilled with last catalogued item my @subfields_to_prefill; -if ( $nextop eq 'additem' && $prefillitem ) { +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; -- 2.39.5