Bug 11405 - Inventory tool enhancements [OMNIBUS]
Summary: Inventory tool enhancements [OMNIBUS]
Status: ASSIGNED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Kyle M Hall
QA Contact: Testopia
URL:
Keywords:
Depends on: 21419 21408 21413
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-16 18:55 UTC by Kyle M Hall
Modified: 2021-05-11 16:31 UTC (History)
21 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Medium patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 11405 [1] - Warn of items possibly scanned out of order (4.93 KB, patch)
2013-12-16 19:29 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 11405 [2] - Skip items with waiting holds (5.14 KB, patch)
2013-12-16 19:29 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 11405 [3] - Update item status fieldset string to be more descriptive (1.33 KB, patch)
2013-12-16 19:29 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 11405 [4] - Allow long labels to be less word-wrapped (1.77 KB, patch)
2013-12-16 19:29 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 11405 [5] - Fix html fieldset weirdness (1.82 KB, patch)
2013-12-16 19:30 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 11405 [6] - Allow items with selected locations to be not be flagged as "Item should have been scanned" if not scanned (4.42 KB, patch)
2013-12-16 19:30 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 11405 [1] - Warn of items possibly scanned out of order (4.93 KB, patch)
2014-01-10 18:38 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 11405 [2] - Skip items with waiting holds (5.17 KB, patch)
2014-01-10 18:38 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 11405 [3] - Update item status fieldset string to be more descriptive (1.33 KB, patch)
2014-01-10 18:38 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 11405 [4] - Allow long labels to be less word-wrapped (1.76 KB, patch)
2014-01-10 18:38 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 11405 [5] - Fix html fieldset weirdness (1.82 KB, patch)
2014-01-10 18:38 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 11405 [6] - Allow items with selected locations to be not be flagged as "Item should have been scanned" if not scanned (4.42 KB, patch)
2014-01-10 18:38 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 11405 [7] - Add out of order status to CSV file (884 bytes, patch)
2014-02-04 18:53 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 11405 [1] - Warn of items possibly scanned out of order (4.93 KB, patch)
2014-08-28 14:28 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 11405 [2] - Skip items with waiting holds (5.17 KB, patch)
2014-08-28 14:28 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 11405 [3] - Update item status fieldset string to be more descriptive (1.33 KB, patch)
2014-08-28 14:28 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 11405 [4] - Allow long labels to be less word-wrapped (1.76 KB, patch)
2014-08-28 14:28 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 11405 [5] - Fix html fieldset weirdness (1.82 KB, patch)
2014-08-28 14:29 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 11405 [6] - Allow items with selected locations to be not be flagged as "Item should have been scanned" if not scanned (4.42 KB, patch)
2014-08-28 14:29 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 11405 [7] - Add out of order status to CSV file (884 bytes, patch)
2014-08-28 14:29 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 11405 [1] - Warn of items possibly scanned out of order (4.93 KB, patch)
2015-06-24 11:28 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 11405 [2] - Skip items with waiting holds (9.44 KB, patch)
2015-06-24 11:28 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 11405 [3] - Update item status fieldset string to be more descriptive (1.33 KB, patch)
2015-06-24 11:28 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 11405 [4] - Allow long labels to be less word-wrapped (1.76 KB, patch)
2015-06-24 11:28 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 11405 [5] - Fix html fieldset weirdness (1.82 KB, patch)
2015-06-24 11:28 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 11405 [6] - Allow items with selected locations to be not be flagged as "Item should have been scanned" if not scanned (4.20 KB, patch)
2015-06-24 11:28 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 11405 [7] - Add out of order status to CSV file (884 bytes, patch)
2015-06-24 11:28 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 11405 [1] - Warn of items possibly scanned out of order (4.85 KB, patch)
2016-01-20 19:22 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 11405 [2] - Skip items with waiting holds (8.46 KB, patch)
2016-01-20 19:22 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 11405 [3] - Update item status fieldset string to be more descriptive (1.33 KB, patch)
2016-01-20 19:22 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 11405 [4] - Allow long labels to be less word-wrapped (1.77 KB, patch)
2016-01-20 19:22 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 11405 [5] - Fix html fieldset weirdness (1.82 KB, patch)
2016-01-20 19:22 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 11405 [6] - Allow items with selected locations to be not be flagged as "Item should have been scanned" if not scanned (4.22 KB, patch)
2016-01-20 19:22 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 11405 [7] - Add out of order status to CSV file (862 bytes, patch)
2016-01-20 19:22 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 11405 [1] - Warn of items possibly scanned out of order (4.93 KB, patch)
2016-01-20 19:34 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 11405 [2] - Skip items with waiting holds (8.46 KB, patch)
2016-01-20 19:34 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 11405 [3] - Update item status fieldset string to be more descriptive (1.33 KB, patch)
2016-01-20 19:34 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 11405 [4] - Allow long labels to be less word-wrapped (1.77 KB, patch)
2016-01-20 19:34 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 11405 [5] - Fix html fieldset weirdness (1.82 KB, patch)
2016-01-20 19:34 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 11405 [6] - Allow items with selected locations to be not be flagged as "Item should have been scanned" if not scanned (4.22 KB, patch)
2016-01-20 19:34 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 11405 [7] - Add out of order status to CSV file (862 bytes, patch)
2016-01-20 19:35 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 11405 [7] - Add out of order status to CSV file (917 bytes, patch)
2016-01-21 12:24 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2013-12-16 18:55:19 UTC
Some libraries would like the following enhancements to the inventory tool:
1) Have the tool warn of items possibly shelved out of order for scanned lists of barcodes ( by comparing to previous and next items ).
2) Ability to skip items with waiting holds ( in the same manners as items on issue are skipped ).
3) The ability to choose locations to not flag as "Item should have been scanned" if not scanned ( e.g. On Shelving Cart, On Display, etc )
Comment 1 Kyle M Hall 2013-12-16 19:29:27 UTC Comment hidden (obsolete)
Comment 2 Kyle M Hall 2013-12-16 19:29:35 UTC Comment hidden (obsolete)
Comment 3 Kyle M Hall 2013-12-16 19:29:44 UTC Comment hidden (obsolete)
Comment 4 Kyle M Hall 2013-12-16 19:29:52 UTC Comment hidden (obsolete)
Comment 5 Kyle M Hall 2013-12-16 19:30:04 UTC Comment hidden (obsolete)
Comment 6 Kyle M Hall 2013-12-16 19:30:17 UTC Comment hidden (obsolete)
Comment 7 Kyle M Hall 2014-01-10 18:38:20 UTC Comment hidden (obsolete)
Comment 8 Kyle M Hall 2014-01-10 18:38:34 UTC Comment hidden (obsolete)
Comment 9 Kyle M Hall 2014-01-10 18:38:37 UTC Comment hidden (obsolete)
Comment 10 Kyle M Hall 2014-01-10 18:38:40 UTC Comment hidden (obsolete)
Comment 11 Kyle M Hall 2014-01-10 18:38:42 UTC Comment hidden (obsolete)
Comment 12 Kyle M Hall 2014-01-10 18:38:46 UTC Comment hidden (obsolete)
Comment 13 Kyle M Hall 2014-02-04 18:53:02 UTC Comment hidden (obsolete)
Comment 14 Owen Leonard 2014-08-13 18:55:06 UTC
Applying: Bug 11405 [1] - Warn of items possibly scanned out of order
Applying: Bug 11405 [2] - Skip items with waiting holds
Applying: Bug 11405 [3] - Update item status fieldset string to be more descriptive
fatal: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 Bug 11405 [3] - Update item status fieldset string to be more descriptive
Comment 15 Kyle M Hall 2014-08-28 14:28:31 UTC Comment hidden (obsolete)
Comment 16 Kyle M Hall 2014-08-28 14:28:53 UTC Comment hidden (obsolete)
Comment 17 Kyle M Hall 2014-08-28 14:28:56 UTC Comment hidden (obsolete)
Comment 18 Kyle M Hall 2014-08-28 14:28:59 UTC Comment hidden (obsolete)
Comment 19 Kyle M Hall 2014-08-28 14:29:02 UTC Comment hidden (obsolete)
Comment 20 Kyle M Hall 2014-08-28 14:29:05 UTC Comment hidden (obsolete)
Comment 21 Kyle M Hall 2014-08-28 14:29:07 UTC Comment hidden (obsolete)
Comment 22 Koha Team AMU 2015-03-06 15:52:53 UTC
I'm trying this patch.
Ok for [1] (mervelous!!)
For [2], I will try again because message "No data available in table" (and normally it's all right).
Ok for [3].

I just have to try csv file.
Comment 23 Mark Tompsett 2015-04-15 07:01:24 UTC
Comment on attachment 31251 [details] [review]
Bug 11405 [2] - Skip items with waiting holds

Review of attachment 31251 [details] [review]:
-----------------------------------------------------------------

::: tools/inventory.pl
@@ +233,4 @@
>  if ( $markseen or $op ) {
>      # retrieve all items in this range.
>      my $totalrecords;
> +    ($inventorylist, $totalrecords) = GetItemsForInventory($minlocation, $maxlocation, $location, $itemtype, $ignoreissued, $ignore_holds_waiting, '', $branchcode, $branch, 0, undef , $staton);

This is where a nasty conflict shows up. Please rebase.
Comment 24 Kyle M Hall 2015-06-24 11:28:06 UTC Comment hidden (obsolete)
Comment 25 Kyle M Hall 2015-06-24 11:28:14 UTC Comment hidden (obsolete)
Comment 26 Kyle M Hall 2015-06-24 11:28:16 UTC Comment hidden (obsolete)
Comment 27 Kyle M Hall 2015-06-24 11:28:19 UTC Comment hidden (obsolete)
Comment 28 Kyle M Hall 2015-06-24 11:28:21 UTC Comment hidden (obsolete)
Comment 29 Kyle M Hall 2015-06-24 11:28:24 UTC Comment hidden (obsolete)
Comment 30 Kyle M Hall 2015-06-24 11:28:27 UTC Comment hidden (obsolete)
Comment 31 Mark Tompsett 2015-06-26 15:44:09 UTC
Comment on attachment 40572 [details] [review]
Bug 11405 [1] - Warn of items possibly scanned out of order

Review of attachment 40572 [details] [review]:
-----------------------------------------------------------------

::: tools/inventory.pl
@@ +373,5 @@
>  my @results;
> +@results =
> +    $uploadbarcodes ? @items_with_problems
> +  : $op             ? @$inventorylist
> +  :                   undef;

Nested ? operators is ugly. Could we improve readability here?
Comment 32 Mark Tompsett 2015-06-26 15:49:59 UTC
Comment on attachment 40577 [details] [review]
Bug 11405 [6] - Allow items with selected locations to be not be flagged as "Item should have been scanned" if not scanned

Review of attachment 40577 [details] [review]:
-----------------------------------------------------------------

::: C4/Items.pm
@@ +1164,4 @@
>          # Auth values
>          foreach (keys %$row) {
>              if (defined($avmapping->{"items.$_,".$row->{'frameworkcode'}.",".$row->{$_}})) {
> +                $row->{"$_-code"} = $row->{$_};

Though not required by PERL17 of the Coding Guidelines, a test would be nice.
Comment 33 Christopher Davis 2015-10-02 20:11:10 UTC
(In reply to Kyle M Hall from comment #1)
> Created attachment 23582 [details] [review] [review]
> Bug 11405 [1] - 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

Hi Everyone,

When I attempt to test this bug on one of the Koha sandboxes, the Koha instance fails to load and the following message was emailed to me:

The sandbox you've requested is not ready.
Some problems occurred applying patches from bug 11405:
<h1>Something went wrong !</h1>Applying: Bug 11405 [1] - Warn of items possibly scanned out of order
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merging tools/inventory.pl
CONFLICT (content): Merge conflict in tools/inventory.pl
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt
Failed to merge in the changes.
Patch failed at 0001 Bug 11405 [1] - Warn of items possibly scanned out of order

When you have resolved this problem run git bz apply --continue.
If you would prefer to skip this patch, instead run git bz apply --skip.
To restore the original branch and stop patching run git bz apply --abort.
Bug 11405 - Inventory tool enhancements

40572 - Bug 11405 [1] - Warn of items possibly scanned out of order
40573 - Bug 11405 [2] - Skip items with waiting holds
40574 - Bug 11405 [3] - Update item status fieldset string to be more descriptive
40575 - Bug 11405 [4] - Allow long labels to be less word-wrapped
40576 - Bug 11405 [5] - Fix html fieldset weirdness
40577 - Bug 11405 [6] - Allow items with selected locations to be not be flagged as Item should have been scanned if not scanned
40578 - Bug 11405 [7] - Add out of order status to CSV file

Apply? [(y)es, (n)o, (i)nteractive] Patch left in /tmp/Bug-11405-1---Warn-of-items-possibly-scanned-out-o-sHNWpq.patch 

FWIW,
Christopher
Comment 34 Katrin Fischer 2015-10-03 17:59:38 UTC
This patch doesn't apply, I have changed the patch status accordingly.

Please also note: 'Inventory tool enhancements' is a suspicious title for a bug and I usually take it as a sign that a patch tries to do a multitude of things at once where it would be nicer to have separated patches for each thing! ;)
Comment 35 Mark Tompsett 2016-01-20 19:22:14 UTC Comment hidden (obsolete)
Comment 36 Mark Tompsett 2016-01-20 19:22:20 UTC Comment hidden (obsolete)
Comment 37 Mark Tompsett 2016-01-20 19:22:26 UTC Comment hidden (obsolete)
Comment 38 Mark Tompsett 2016-01-20 19:22:33 UTC Comment hidden (obsolete)
Comment 39 Mark Tompsett 2016-01-20 19:22:39 UTC Comment hidden (obsolete)
Comment 40 Mark Tompsett 2016-01-20 19:22:51 UTC Comment hidden (obsolete)
Comment 41 Mark Tompsett 2016-01-20 19:22:58 UTC Comment hidden (obsolete)
Comment 42 Mark Tompsett 2016-01-20 19:34:27 UTC
Created attachment 47035 [details] [review]
Bug 11405 [1] - 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
Comment 43 Mark Tompsett 2016-01-20 19:34:33 UTC
Created attachment 47036 [details] [review]
Bug 11405 [2] - 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
Comment 44 Mark Tompsett 2016-01-20 19:34:38 UTC
Created attachment 47037 [details] [review]
Bug 11405 [3] - Update item status fieldset string to be more descriptive

The inventory tool has a fieldset title "Item status" but does not
explain what selecting item statuses does. This fieldset legend should
be updated to explain what these checkboxes do.

This patch changes the legend from "Item statuses" to "Limit to items
matching all the following statuses".
Comment 45 Mark Tompsett 2016-01-20 19:34:43 UTC
Created attachment 47038 [details] [review]
Bug 11405 [4] - Allow long labels to be less word-wrapped

The labels in the last fieldset of the inventory tool are a bit
"squashed" and are word wrapped to many lines unnecessarily. This patch
adds an additional css style for fieldsets of the class "row". If an
additional class "wide" as added to the fieldset, it will give the
labels more room for display.
Comment 46 Mark Tompsett 2016-01-20 19:34:48 UTC
Created attachment 47039 [details] [review]
Bug 11405 [5] - Fix html fieldset weirdness

For unknown and unnecessary reasons, the inventory tool display will
attempt to merge the "select items you want to check" fieldset with the
bottom fieldset if no statuses are present. This situation is highly
unlikely and complicates the template logic.
Comment 47 Mark Tompsett 2016-01-20 19:34:54 UTC
Created attachment 47040 [details] [review]
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"
Comment 48 Mark Tompsett 2016-01-20 19:35:00 UTC Comment hidden (obsolete)
Comment 49 Mark Tompsett 2016-01-20 19:36:24 UTC
It would be handy if Kyle could recheck this too. :)
I have merely made it applicable and tried to match old code differences. I have not tested it.
Comment 50 Kyle M Hall 2016-01-21 12:24:02 UTC
Created attachment 47106 [details] [review]
Bug 11405 [7] - Add out of order status to CSV file

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 51 Jason Burds 2016-02-08 19:43:25 UTC
Working on the test plan, I was not able to get it to pass using the sandbox.

Compare barcodes list to results doesn't work.

Tried using an txt file with 5 items in it.  There are 6 items with the call number FIC.

I get stuck on number 6.

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
Comment 52 Liz Rea 2016-09-12 02:36:10 UTC
Applying: Bug 11405 [1] - Warn of items possibly scanned out of order
Applying: Bug 11405 [2] - Skip items with waiting holds
Applying: Bug 11405 [3] - Update item status fieldset string to be more descriptive
Applying: Bug 11405 [4] - Allow long labels to be less word-wrapped
fatal: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 Bug 11405 [4] - Allow long labels to be less word-wrapped

Very sorry to say the last patch doesn't apply any more.