From d4f133b0c03a0ef71ba689cea9abbea0a5149b80 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Fri, 12 Apr 2019 11:42:39 +0200 Subject: [PATCH] Bug 21975: (follow-up) get item datas from previous SQL query Forced by removal of C4::Items::GetItem from Bug 21206 Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer Signed-off-by: Nick Clemens --- C4/Items.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index dcbf4aef94..f0f70c7307 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -2610,7 +2610,7 @@ sub ToggleNewStatus { my @params; my $query = q| - SELECT items.biblionumber, items.itemnumber + SELECT items.* FROM items LEFT JOIN biblioitems ON biblioitems.biblionumber = items.biblionumber WHERE 1 @@ -2643,7 +2643,7 @@ sub ToggleNewStatus { my $itemnumber = $values->{itemnumber}; for my $substitution ( @$substitutions ) { next unless $substitution->{field}; - next if ( $item->{ $substitution->{item_field} } eq $substitution->{value} ); + next if ( $values->{ $substitution->{item_field} } eq $substitution->{value} ); C4::Items::ModItem( { $substitution->{item_field} => $substitution->{value} }, $biblionumber, $itemnumber ) unless $report_only; push @{ $report->{$itemnumber} }, $substitution; -- 2.39.5