From 6ae81043b794e9b5cb4bf2486d6f88b7917a397a Mon Sep 17 00:00:00 2001 From: Andrew Nugged Date: Sat, 16 Oct 2021 00:16:35 +0300 Subject: [PATCH] Bug 27526: Fix for prefill preventing duplication Signed-off-by: Jonathan Druart --- cataloguing/additem.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index 8c7b1636a9..2dd4ad0a84 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -819,7 +819,8 @@ for my $library ( @$libraries ) { # Using last created item if it exists if ( $prefillitem && $op ne "additem" - && $op ne "edititem" ) + && $op ne "edititem" + && $op ne "dupeitem" ) { my $item_from_cookie = get_item_from_cookie($input); $current_item = $item_from_cookie if $item_from_cookie; @@ -852,6 +853,7 @@ foreach my $tag ( keys %{$tagslib} ) { # If the subfield must be prefilled with last catalogued item if ( $nextop ne 'additem' + || $op eq 'dupeitem' || ( !$prefillitem || ( $prefillitem && grep { $_ eq $subtag } -- 2.39.5