Bugzilla – Attachment 24178 Details for
Bug 11405
Inventory tool enhancements [OMNIBUS]
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11405 [6] - Allow items with selected locations to be not be flagged as "Item should have been scanned" if not scanned
Bug-11405-6---Allow-items-with-selected-locations-.patch (text/plain), 4.42 KB, created by
Kyle M Hall (khall)
on 2014-01-10 18:38:46 UTC
(
hide
)
Description:
Bug 11405 [6] - Allow items with selected locations to be not be flagged as "Item should have been scanned" if not scanned
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-01-10 18:38:46 UTC
Size:
4.42 KB
patch
obsolete
>From 18f00244f7e5a5dde1e56f9b8a188bac7d1ccd66 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 16 Dec 2013 13:23:34 -0500 >Subject: [PATCH] Bug 11405 [6] - Allow items with selected locations to be not be flagged as "Item should have been scanned" if not scanned > >This patch allows items to be skipped over if >the item has one of the locations selected in >the new field set listing shelving locations. > >Test Plan: >1) Apply this patch >2) Generate a list of barcodes ordered by callnumber >3) Set one of those items to a shelving location >4) Remove that item from the list >5) Run the inventory tool with this list of barcodes >6) Note the item is listed as "should have been scanned" >7) Click back to return to the previous page >8) Select the shelving location from "If comparing barcodes list to >results, assume items with the following locations should note have been >scanned". >8) Re-run the inventory tool >9) Note the item is no longer listed as "should have been scanned" >--- > C4/Items.pm | 5 ++++- > .../prog/en/modules/tools/inventory.tt | 15 +++++++++++++++ > tools/inventory.pl | 9 ++++++--- > 3 files changed, 25 insertions(+), 4 deletions(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index e59bc49..447a468 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -1112,7 +1112,10 @@ sub GetItemsForInventory { > if ($f and $sf) { > # We replace the code with it's description > my $authvals = C4::Koha::GetKohaAuthorisedValuesFromField($f, $sf, $row->{'frameworkcode'}); >- $row->{$_} = $authvals->{$row->{$_}} if defined $authvals->{$row->{$_}}; >+ if ( defined $authvals->{ $row->{$_} } ) { >+ $row->{"$_-code"} = $row->{$_}; >+ $row->{$_} = $authvals->{ $row->{$_} }; >+ } > } > } > push @results, $row; >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 80c50a0..39af018 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt >@@ -163,6 +163,21 @@ $(document).ready(function(){ > </fieldset> > [% END %] > >+ [% IF (authorised_values) %] >+ <fieldset class="rows"> >+ <legend>If comparing barcodes list to results, assume items with the following locations should not have been scanned</legend> >+ >+ <ol> >+ [% FOREACH value IN authorised_values %] >+ <li> >+ <label for="ignore_locations">[% value.lib %]</label> >+ <input type="checkbox" name="ignore_locations" value="[% value.authorised_value %]"> >+ </li> >+ [% END %] >+ </ol> >+ </fieldset> >+ [% END %] >+ > <fieldset class="rows wide"> > <ol> > <li><label for="datelastseen">Inventory date:</label> >diff --git a/tools/inventory.pl b/tools/inventory.pl >index 2529106..81dc489 100755 >--- a/tools/inventory.pl >+++ b/tools/inventory.pl >@@ -37,7 +37,7 @@ use C4::Circulation; > use C4::Reports::Guided; #_get_column_defs > use C4::Charset; > use Koha::DateUtils; >-use List::MoreUtils qw( none ); >+use List::MoreUtils qw( none any ); > > > my $minlocation=$input->param('minlocation') || ''; >@@ -54,6 +54,7 @@ my $branch = $input->param('branch'); > my $op = $input->param('op'); > my $compareinv2barcd = $input->param('compareinv2barcd'); > my $out_of_order = $input->param('out_of_order'); >+my @ignore_locations = $input->param('ignore_locations'); > > my ( $template, $borrowernumber, $cookie ) = get_template_and_user( > { template_name => "tools/inventory.tt", >@@ -285,8 +286,10 @@ if ( $compareinv2barcd ) { > for my $should_be_scanned ( @$inventorylist ) { > my $barcode = $should_be_scanned->{barcode}; > unless ( grep /^$barcode$/, @scanned_barcodes ) { >- $should_be_scanned->{problem} = 'not_scanned'; >- push @items_with_problems, { %$should_be_scanned }; >+ unless ( any { $should_be_scanned->{'location-code'} eq $_ } @ignore_locations ) { >+ $should_be_scanned->{problem} = 'not_scanned'; >+ push @items_with_problems, { %$should_be_scanned }; >+ } > } > } > } >-- >1.7.2.5
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 11405
:
23582
|
23583
|
23584
|
23585
|
23586
|
23587
|
24173
|
24174
|
24175
|
24176
|
24177
|
24178
|
25037
|
31250
|
31251
|
31252
|
31253
|
31254
|
31255
|
31256
|
40572
|
40573
|
40574
|
40575
|
40576
|
40577
|
40578
|
47027
|
47028
|
47029
|
47030
|
47031
|
47032
|
47033
|
47035
|
47036
|
47037
|
47038
|
47039
|
47040
|
47041
|
47106