Bugzilla – Attachment 79371 Details for
Bug 21408
Inventory - Warn of items possibly scanned out of order
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21408: Inventory - Warn of items possibly scanned out of order
Bug-21408-Inventory---Warn-of-items-possibly-scann.patch (text/plain), 4.20 KB, created by
Tomás Cohen Arazi (tcohen)
on 2018-09-25 13:21:17 UTC
(
hide
)
Description:
Bug 21408: Inventory - Warn of items possibly scanned out of order
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2018-09-25 13:21:17 UTC
Size:
4.20 KB
patch
obsolete
>From 4acf5ab425f4245640ed051506dee0c980224a4f Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 25 Sep 2018 10:16:53 -0300 >Subject: [PATCH] Bug 21408: Inventory - Warn of items possibly scanned out of > order > >This patch addes the ability to choose to be warned if it's possible >an item was scanned out of order ( i.e. mis-shelved ). > >Test Plan: >1) Apply this patch >2) Generate a list of barcodes ordered by callnumber >3) "Misplace" one callnumber by moving it to another area of the list >4) Browse to the inventory tool, choose your barcodes file >5) Check the checkbox for "Check barcodes list for items shelved out of order" >6) Click "submit", note the item has been flagged as possibly out of order > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > .../prog/en/modules/tools/inventory.tt | 3 +++ > tools/inventory.pl | 24 ++++++++++++++++++- > 2 files changed, 26 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt >index 0b97bf361c..60c91dc553 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt >@@ -47,6 +47,7 @@ > <li><label for="setdate">Set inventory date to:</label> <input type="text" id="setdate" name="setdate" value="[% today | $KohaDates %]" class="datepicker" disabled /></li> > <li><label for="compareinv2barcd">Compare barcodes list to results: </label><input type="checkbox" name="compareinv2barcd" id="compareinv2barcd" disabled /></li> > <li><label for="dont_checkin">Do not check in items scanned during inventory: </label><input type="checkbox" name="dont_checkin" id="dont_checkin" disabled /></li> >+ <li><label for="out_of_order">Check barcodes list for items shelved out of order: </label><input type="checkbox" name="out_of_order" id="out_of_order" disabled /></li> > </ol> > </fieldset> > >@@ -225,6 +226,8 @@ > Still checked out<br/> > [% ELSIF problem.key == 'no_barcode' %] > No barcode<br/> >+ [% ELSIF problem.key == 'out_of_order' %] >+ Item may be shelved out of order<br/> > [% END %] > [% END %] > </td> >diff --git a/tools/inventory.pl b/tools/inventory.pl >index 3da000afc0..005d730d71 100755 >--- a/tools/inventory.pl >+++ b/tools/inventory.pl >@@ -52,6 +52,7 @@ my $branch = $input->param('branch'); > my $op = $input->param('op'); > my $compareinv2barcd = $input->param('compareinv2barcd'); > my $dont_checkin = $input->param('dont_checkin'); >+my $out_of_order = $input->param('out_of_order'); > > my ( $template, $borrowernumber, $cookie ) = get_template_and_user( > { template_name => "tools/inventory.tt", >@@ -252,7 +253,10 @@ if( @scanned_items ) { > > # Report scanned items that are on the wrong place, or have a wrong notforloan > # status, or are still checked out. >-foreach my $item ( @scanned_items ) { >+for ( my $i = 0; $i < @scanned_items; $i++ ) { >+ >+ my $item = $scanned_items[$i]; >+ > $item->{notforloancode} = $item->{notforloan}; # save for later use > my $fc = $item->{'frameworkcode'} || ''; > >@@ -271,6 +275,24 @@ foreach my $item ( @scanned_items ) { > additemtoresults( $item, $results ); > } > >+ # Check for items shelved out of order >+ if ($out_of_order) { >+ unless ( $i == 0 ) { >+ my $previous_item = $scanned_items[ $i - 1 ]; >+ if ( $previous_item && $item->{cn_sort} lt $previous_item->{cn_sort} ) { >+ $item->{problems}->{out_of_order} = 1; >+ additemtoresults( $item, $results ); >+ } >+ } >+ unless ( $i == scalar(@scanned_items) ) { >+ my $next_item = $scanned_items[ $i + 1 ]; >+ if ( $next_item && $item->{cn_sort} gt $next_item->{cn_sort} ) { >+ $item->{problems}->{out_of_order} = 1; >+ additemtoresults( $item, $results ); >+ } >+ } >+ } >+ > # Report an item that is checked out (unusual!) or wrongly placed > if( $item->{onloan} ) { > $item->{problems}->{checkedout} = 1; >-- >2.19.0
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 21408
:
79371
|
79374
|
81380
|
81381