From 675f27bcacf901792a3e62d36bf4d0ed06139338 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 --- cataloguing/additem.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index 7120bb8e90..37e92dfe50 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -826,7 +826,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; @@ -859,6 +860,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.33.0