Bug 14001: Inventory has bad $_ references
commit13325b259775765e8842a1cf2fbe528d734144a9
authorMark Tompsett <mtompset@hotmail.com>
Wed, 15 Apr 2015 16:33:29 +0000 (15 12:33 -0400)
committerLiz Rea <wizzyrea@gmail.com>
Thu, 16 Jul 2015 09:36:35 +0000 (16 09:36 +0000)
tree71ab27b37cb02be2a664d7c5f2e22aa364a93779
parent9a0408c029555ee8de98ca5e66844fc91544f9e6
Bug 14001: Inventory has bad $_ references

After receiving an error while attempt a simple inventory run,
Two lines were changed from:
    ...$_->...
to
    ...$item->...
since the loop variable is $item. And $_ is not set to the
expected hash reference, when there is a loop variable.

This also helps explain the "Why are there blank dates on my
last seen field?" problem that has been mentioned by users.

TEST PLAN
---------
 1) Apply this patch after a reset to master.
 2) Log in to staff client
 3) Add one item via z39.50, setting barcode to a known value (BARCODE1)
 4) Wait for the reindex
 5) Home -> Tools -> Inventory/Stocktaking
 6) Browse for a file with the barcode in it
 7) Set the library dropdown to the library branch of the added item.
 8) Check 'Compare barcodes list to results:'
 9) Click 'Submit'
    -- This should not die under plack.
       This should not generate blank last seen dates.
       The last seen dates should be as expected.
10) run koha qa test tools
11) Confirm the two change point correspond to the two change points
    in the patch which shall not be pushed to master.

The test result comply with expected outcome outlined in test plan.

Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
(cherry picked from commit 3ebc081962247ce0c598da810451c459909842bc)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
tools/inventory.pl