Bugzilla – Attachment 81378 Details for
Bug 21413
Inventory - Allow skipping items with waiting holds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21413: Inventory - Skip items with waiting holds
Bug-21413-Inventory---Skip-items-with-waiting-hold.patch (text/plain), 4.40 KB, created by
Katrin Fischer
on 2018-10-27 21:44:11 UTC
(
hide
)
Description:
Bug 21413: Inventory - Skip items with waiting holds
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2018-10-27 21:44:11 UTC
Size:
4.40 KB
patch
obsolete
>From e65c493d5f459cd20fc864d5f076995150749c7c Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 26 Sep 2018 11:41:14 -0300 >Subject: [PATCH] Bug 21413: Inventory - Skip items with waiting holds > >This patch enables items to be skipped for inventory stocktaking >if the item is currently a waiting hold. The intention is to skip >items that should be on the holds waiting shelf in the library. > >Test Plan: >1) Apply this patch >2) Generate a list of barcodes ordered by callnumber >3) Select one of those items and place it on hold, then confirm the hold >4) Remove that barcode from the list of barcodes >5) Browse to the inventory tool, choose your barcodes file >6) Run the inventory tool with that barcode file. >7) Note the tool says that item should have been scanned >8) Click the browsers back button to return to the previous page >9) Check the checkbox for "Skip copies marked as waiting holds" >10) Run the tool again, not it does not flag that item as previously > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > C4/Items.pm | 6 ++++++ > koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt | 4 ++++ > tools/inventory.pl | 4 ++++ > 3 files changed, 14 insertions(+) > >diff --git a/C4/Items.pm b/C4/Items.pm >index f81e0ca1b8..d3736adaec 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -814,6 +814,7 @@ sub GetItemsForInventory { > my $offset = $parameters->{'offset'} // ''; > my $size = $parameters->{'size'} // ''; > my $statushash = $parameters->{'statushash'} // ''; >+ my $ignore_waiting_holds = $parameters->{'ignore_waiting_holds'} // ''; > > my $dbh = C4::Context->dbh; > my ( @bind_params, @where_strings ); >@@ -876,6 +877,11 @@ sub GetItemsForInventory { > push @where_strings, 'issues.date_due IS NULL'; > } > >+ if ( $ignore_waiting_holds ) { >+ $query .= "LEFT JOIN reserves ON items.itemnumber = reserves.itemnumber "; >+ push( @where_strings, q{reserves.found != 'W' OR reserves.found IS NULL} ); >+ } >+ > if ( @where_strings ) { > $query .= 'WHERE '; > $query .= join ' AND ', @where_strings; >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 a8a68633a0..06200b0582 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt >@@ -128,6 +128,10 @@ > <input type="checkbox" id="ignoreissued" name="ignoreissued" /> > [% END %] > </li> >+ <li> >+ <label for="ignore_waiting_holds">Skip copies marked as waiting holds: </label> >+ <input type="checkbox" id="ignore_waiting_holds" name="ignore_waiting_holds" /> >+ </li> > </ol> > </fieldset> > >diff --git a/tools/inventory.pl b/tools/inventory.pl >index 2ad1dd8d2c..ca46ea2801 100755 >--- a/tools/inventory.pl >+++ b/tools/inventory.pl >@@ -46,6 +46,7 @@ my $maxlocation=$input->param('maxlocation'); > $maxlocation=$minlocation.'Z' unless ( $maxlocation || ! $minlocation ); > my $location=$input->param('location') || ''; > my $ignoreissued=$input->param('ignoreissued'); >+my $ignore_waiting_holds = $input->param('ignore_waiting_holds'); > my $datelastseen = $input->param('datelastseen'); # last inventory date > my $branchcode = $input->param('branchcode') || ''; > my $branch = $input->param('branch'); >@@ -126,6 +127,7 @@ $template->param( > datelastseen => $datelastseen, > compareinv2barcd => $compareinv2barcd, > uploadedbarcodesflag => $uploadbarcodes ? 1 : 0, >+ ignore_waiting_holds => $ignore_waiting_holds, > ); > > # Walk through uploaded barcodes, report errors, mark as seen, check in >@@ -229,6 +231,7 @@ if ( $op && ( !$uploadbarcodes || $compareinv2barcd )) { > branch => $branch, > offset => 0, > statushash => $staton, >+ ignore_waiting_holds => $ignore_waiting_holds, > }); > } > # Build rightplacelist used to check if a scanned item is in the right place. >@@ -243,6 +246,7 @@ if( @scanned_items ) { > branch => $branch, > offset => 0, > statushash => undef, >+ ignore_waiting_holds => $ignore_waiting_holds, > }); > # Convert the structure to a hash on barcode > $rightplacelist = { >-- >2.11.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 21413
:
79432
|
79433
|
81376
|
81377
| 81378 |
81379
|
82040
|
82111
|
82168