From 8d175561559064ff7d5ecdb10722bf30ba9f1eaf Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Fri, 12 Apr 2019 11:42:39 +0200 Subject: [PATCH] Bug 21975 : (followup) get item datas from previous SQL query Forced by removal of C4::Items::GetItem from Bug 21206 --- 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.17.1