From bf775a20ca5cae7a77c3ad8e59ac2e366b80e2e9 Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Fri, 24 Apr 2015 10:10:22 -0400 Subject: [PATCH] Bug 14061: Fix broken mapping for not withdrawn items. TEST PLAN --------- 1) Run inventory on a filtered set such that the selected barcode is not withdrawn. -- the Withdrawn column displays '0'. 2) Apply patch 3) Rerun -- the Withdrawn column displays '' (as expected) 4) run koha qa test tools --- tools/inventory.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/inventory.pl b/tools/inventory.pl index b8cc31d..91e1c72 100755 --- a/tools/inventory.pl +++ b/tools/inventory.pl @@ -272,7 +272,7 @@ foreach my $item ( @scanned_items ) { # If the koha field is mapped to a marc field my $fc = $item->{'frameworkcode'} || ''; my ($f, $sf) = GetMarcFromKohaField("items.$field", $fc); - if ($f and $sf) { + if (defined $f and defined $sf) { # We replace the code with it's description my $authvals = C4::Koha::GetKohaAuthorisedValuesFromField($f, $sf, $fc); if ($authvals and defined $item->{$field} and defined $authvals->{$item->{$field}}) { -- 1.9.1