Bugzilla – Attachment 35859 Details for
Bug 12631
Inventory: fix "wrong place" and "item not scanned" statuses
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
BZ12631: Inventory: fix "wrong place" and "item not scanned"
BZ12631-Inventory-fix-wrong-place-and-item-not-sca.patch (text/plain), 3.67 KB, created by
Brendan Gallagher
on 2015-02-12 06:09:01 UTC
(
hide
)
Description:
BZ12631: Inventory: fix "wrong place" and "item not scanned"
Filename:
MIME Type:
Creator:
Brendan Gallagher
Created:
2015-02-12 06:09:01 UTC
Size:
3.67 KB
patch
obsolete
>From 5b9ed0dc3cc615e45c282783940d0e3acef27ed7 Mon Sep 17 00:00:00 2001 >From: Matthias Meusburger <matthias.meusburger@biblibre.com> >Date: Mon, 23 Jun 2014 16:51:00 +0200 >Subject: [PATCH] BZ12631: Inventory: fix "wrong place" and "item not scanned" > > "item not scanned": when calling GetItemsForInventory, datelastseen should > be used when "compare barcodes list to result" is checked. > > Otherwise, when loading multiple barcodes files for the same inventory, many > items will be marked as "item not scanned" when loading the last barcode file > ("compare barcodes list to result" checked) even though they were scanned. > > "wrong place": when searching for wrongly placed items, we should only check > for the location (callnumbers, location and branch). To fix this, A new call > to GetItemsForInventory has been made with location filters only. > > Otherwise, any item with a different itemtype for instance will be marked as > wrong place even if the location is correct. > > Test plan: > >"item not scanned" status: > >1) Split a barcode file in two. >2) Load the first barcode file without checking "compare barcodes list to result". >3) Load the second barcode file with "compare barcodes list to result" checked. >4) Check in the csv report that you have a lot of scanned items with the "item >not scanned" status. > >Then apply the patch, do the same, and check that the false "item not scanned" >statuses are gone. > >"wrong place" status: > >1) Load a barcode file with barcode matching an item that has a correct >location, but a different itemtype than what you're looking for. >2) Check in the results that this item will be marked as "change item status" >and "wrong place". > >Then apply the patch, do the same, and check that the only status for this item is "change item status", which is correct. > >Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> >--- > tools/inventory.pl | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > >diff --git a/tools/inventory.pl b/tools/inventory.pl >index 8c88349..b8cc31d 100755 >--- a/tools/inventory.pl >+++ b/tools/inventory.pl >@@ -226,11 +226,19 @@ if ( $uploadbarcodes && length($uploadbarcodes) > 0 ) { > > # now build the result list: inventoried items if requested, and mis-placed items -always- > my $inventorylist; >+my $wrongplacelist; > my @items_with_problems; > if ( $markseen or $op ) { > # retrieve all items in this range. > my $totalrecords; >- ($inventorylist, $totalrecords) = GetItemsForInventory($minlocation, $maxlocation, $location, $itemtype, $ignoreissued, '', $branchcode, $branch, 0, undef , $staton); >+ >+ # We use datelastseen only when comparing the results to the barcode file. >+ my $paramdatelastseen = ($compareinv2barcd) ? $datelastseen : ''; >+ ($inventorylist, $totalrecords) = GetItemsForInventory($minlocation, $maxlocation, $location, $itemtype, $ignoreissued, $paramdatelastseen, $branchcode, $branch, 0, undef, $staton); >+ >+ # For the items that may be marked as "wrong place", we only check the location (callnumbers, location and branch) >+ ($wrongplacelist, $totalrecords) = GetItemsForInventory($minlocation, $maxlocation, $location, undef, undef, undef, $branchcode, $branch, 0, undef, undef); >+ > } > > # If "compare barcodes list to results" has been checked, we want to alert for missing items >@@ -280,7 +288,7 @@ foreach my $item ( @scanned_items ) { > $item->{problem} = 'changestatus'; > push @items_with_problems, { %$item }; > } >- if (none { $item->{barcode} eq $_->{barcode} && !$_->{'onloan'} } @$inventorylist) { >+ if (none { $item->{barcode} eq $_->{barcode} && !$_->{'onloan'} } @$wrongplacelist) { > $item->{problem} = 'wrongplace'; > push @items_with_problems, { %$item }; > } >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 12631
:
29976
|
34236
|
35859
|
36082