Bugzilla – Attachment 28521 Details for
Bug 12025
Inventory tool fails with "Could not reads headers", or sometimes a timeout
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12025 - Inventory tool fails with "Could not reads headers", or sometimes a timeout
Bug-12025---Inventory-tool-fails-with-Could-not-re.patch (text/plain), 4.99 KB, created by
Marcel de Rooy
on 2014-05-28 14:09:17 UTC
(
hide
)
Description:
Bug 12025 - Inventory tool fails with "Could not reads headers", or sometimes a timeout
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2014-05-28 14:09:17 UTC
Size:
4.99 KB
patch
obsolete
>From aed22daf2979188a3edc20a77571e61aea7186f9 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 21 May 2014 07:14:50 -0400 >Subject: [PATCH] Bug 12025 - Inventory tool fails with "Could not reads > headers", or sometimes a timeout >Content-Type: text/plain; charset=utf-8 > >For libraries with large numbers of records, using a file of barcodes in >the inventory tool without selecting filters to limit the catalog >selection to compare against can result in an error of "could not read >headers" or a page timeout. > >When you upload a file of barcodes, and do not specify any filters on >the rest of the form, it effectively runs GetItemsForInventory() such >that *every* item in the database is returned. On a large enough >database, this takes so long that the script times out. > >The current documentation in the manual implies that if you upload a >file of barcodes, the *only* thing it does is set the date-last-seen >field. This is not entirely true; it also tries to compare the list of >scanned items to what is expected to be seen in the list of items. > >The work-around for libraries with a large number of item records is to, >when uploading a file of barcodes, to also set the filters (e.g., >library, shelving location, call number range, etc.) to >specify the range of items that the file of barcodes corresponds to. > >This patch adds a warning when a librarian attempts to upload a >barcode list file for comparison without selecting any filters >to limit the catalog selection. > >Test Plan: >1) Apply this patch >2) Browse to the inventory tool >3) Click the "Choose File" button, select a file >4) Click the "Submit" button >5) You should see a warning message >6) Click "Cancel" >7) Select one of more filters >8) Click the "Submit" button >9) This time the script should proceed without triggering the warning. > >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Work as described following test plan. >No errors > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > .../prog/en/modules/tools/inventory.tt | 29 +++++++++++++++----- > 1 files changed, 22 insertions(+), 7 deletions(-) > >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 c8034c3..c2d9a8c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt >@@ -8,8 +8,27 @@ > <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> > <script type="text/javascript"> > //<![CDATA[ >-$(document).ready(function(){ >+function checkForm() { >+ if ( $('#uploadbarcodes').val() ) { >+ if ( !( >+ $('#branchloop').val() || >+ $('#locationloop').val() || >+ $('#minlocation').val() || >+ $('#maxlocation').val() || >+ $('#statuses input:checked').length >+ ) ) { >+ return confirm( >+ _("You have not selected any catalog filters and are about to compare a file of barcodes to your entire catalog.") + "\n\n" + >+ _("For large catalogs this can result in unexpected behavior") + "\n\n" + >+ _("Are you sure you want to do this?") >+ ); >+ } >+ } >+ >+ return true; >+} > >+$(document).ready(function(){ > inventorydt = $('#inventoryt').dataTable($.extend(true, {}, dataTablesDefaults, { > 'sPaginationType': 'full_numbers', > [% IF compareinv2barcd %] >@@ -88,7 +107,7 @@ $(document).ready(function(){ > [% END %] > [% UNLESS op %] > <div class="yui-g"> >- <form method="post" action="/cgi-bin/koha/tools/inventory.pl" enctype="multipart/form-data"> >+ <form method="post" action="/cgi-bin/koha/tools/inventory.pl" enctype="multipart/form-data" onsubmit="return checkForm()"> > <fieldset class="rows"> > <legend>Use a barcode file</legend> > <ol> >@@ -98,9 +117,6 @@ $(document).ready(function(){ > </ol> > </fieldset> > >- <!-- submit button for uploaded file --> >- <fieldset class="action"><input type="submit" value="Submit" class="button" /></fieldset> >- > <fieldset class="rows"> > <legend>Select items you want to check</legend> > <ol><li> >@@ -144,7 +160,7 @@ $(document).ready(function(){ > </fieldset> > <fieldset class="rows"> > <legend>Item statuses</legend> >- <div name="statuses" style="display: block;"> >+ <div id="statuses" style="display: block;"> > [% FOREACH status IN statuses %] > [% IF (status.values) %] > <fieldset style="float: left; padding: 5px; margin: 5px;text-align:right"> >@@ -189,7 +205,6 @@ $(document).ready(function(){ > </fieldset> > <input type="hidden" name="op" value="do_it" /> > >- <!-- repeat submit button for generating shelf list --> > <fieldset class="action"><input type="submit" value="Submit" class="button" /></fieldset> > </form> > </div> >-- >1.7.7.6
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 12025
:
26759
|
28401
|
28404
|
28519
| 28521