From 9341e74aa265037c9f47a5a2d69538a3c3a7cbd1 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 8 Jul 2021 15:32:59 +0200 Subject: [PATCH] Bug 27526: Fix repeatable more subfields We retrieved always the first value. Signed-off-by: Tomas Cohen Arazi Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi Signed-off-by: Jonathan Druart --- cataloguing/additem.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index 1a3614bdd4..f25c8b8f68 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -681,9 +681,9 @@ if ($op eq "additem") { if ( $c eq 'more_subfields_xml' ) { my @more_subfields_xml = $input->multi_param("items.more_subfields_xml"); my @unlinked_item_subfields; - for my $subfield ( @more_subfields_xml ) { - my $v = $input->param('items.more_subfields_xml_' . $subfield); - push @unlinked_item_subfields, $subfield, $v; + for my $subfield ( uniq @more_subfields_xml ) { + my @v = $input->multi_param('items.more_subfields_xml_' . $subfield); + push @unlinked_item_subfields, $subfield, $_ for @v; } if ( @unlinked_item_subfields ) { my $marc = MARC::Record->new(); -- 2.39.5