Bug 21413 - Inventory - Allow skipping items with waiting holds
Summary: Inventory - Allow skipping items with waiting holds
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 11405 21419 22219
  Show dependency treegraph
 
Reported: 2018-09-26 13:59 UTC by Tomás Cohen Arazi
Modified: 2020-01-06 20:14 UTC (History)
4 users (show)

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


Attachments
Bug 21413: Unit tests (5.09 KB, patch)
2018-09-26 14:47 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 21413: Inventory - Skip items with waiting holds (4.34 KB, patch)
2018-09-26 14:47 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 21413: Unit tests (5.15 KB, patch)
2018-10-27 21:42 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 21413: Unit tests (5.16 KB, patch)
2018-10-27 21:44 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 21413: Inventory - Skip items with waiting holds (4.40 KB, patch)
2018-10-27 21:44 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 21413: (QA follow-up) Rename new option (1.29 KB, patch)
2018-10-27 21:44 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 21413: Fix condition to avoid operator bnding isssues (1.88 KB, patch)
2018-11-07 16:48 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 21413: Call AddBiblio in list context (887 bytes, patch)
2018-11-08 19:40 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 21413: (QA follow-up) Fix tests (2.38 KB, patch)
2018-11-09 14:07 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi 2018-09-26 13:59:30 UTC

    
Comment 1 Tomás Cohen Arazi 2018-09-26 14:47:12 UTC
Created attachment 79432 [details] [review]
Bug 21413: Unit tests

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Items/GetItemsForInventory.t
=> FAIL: Tests fail!
- Apply the next patches on the bug
- Run:
 k$ prove t/db_dependent/Items/GetItemsForInventory.t
=> SUCCESS: Tests pass!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 2 Tomás Cohen Arazi 2018-09-26 14:47:15 UTC
Created attachment 79433 [details] [review]
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>
Comment 3 Marcel de Rooy 2018-09-26 14:58:07 UTC
Writing patches under another name? :)
Comment 4 Tomás Cohen Arazi 2018-09-26 15:16:55 UTC
(In reply to Marcel de Rooy from comment #3)
> Writing patches under another name? :)

I'm splitting bug 11405. On this one I added tests too.
Comment 5 Katrin Fischer 2018-10-27 21:42:49 UTC
Created attachment 81376 [details] [review]
Bug 21413: Unit tests

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Items/GetItemsForInventory.t
=> FAIL: Tests fail!
- Apply the next patches on the bug
- Run:
 k$ prove t/db_dependent/Items/GetItemsForInventory.t
=> SUCCESS: Tests pass!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Katrin Fischer 2018-10-27 21:44:06 UTC
Created attachment 81377 [details] [review]
Bug 21413: Unit tests

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Items/GetItemsForInventory.t
=> FAIL: Tests fail!
- Apply the next patches on the bug
- Run:
 k$ prove t/db_dependent/Items/GetItemsForInventory.t
=> SUCCESS: Tests pass!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Katrin Fischer 2018-10-27 21:44:11 UTC
Created attachment 81378 [details] [review]
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>
Comment 8 Katrin Fischer 2018-10-27 21:44:15 UTC
Created attachment 81379 [details] [review]
Bug 21413: (QA follow-up) Rename new option

Trying to make the terminology a little more consistent
as we already use items instead of copies directly
above and leaning on the description of the page it
refers to.

Old:
Skip copies marked as waiting holds

New:
Skip items on hold awaiting pickup

Skip items on hold awaiting pickup
Comment 9 Katrin Fischer 2018-10-27 21:44:54 UTC
Last patch is a suggestion, leaving it to native-speaker RM to decide :)
Comment 10 Tomás Cohen Arazi 2018-11-07 16:48:12 UTC
Created attachment 82040 [details] [review]
Bug 21413: Fix condition to avoid operator bnding isssues

The original WHERE condition wasn't enclosed in parenthesis, and hence
was subject to binding precedence issues in some situations.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 11 Nick Clemens 2018-11-08 18:23:21 UTC
Awesome work all!

Pushed to master for 18.11
Comment 12 Tomás Cohen Arazi 2018-11-08 19:40:26 UTC
Created attachment 82111 [details] [review]
Bug 21413: Call AddBiblio in list context

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 13 Nick Clemens 2018-11-08 20:02:12 UTC
(In reply to Tomás Cohen Arazi from comment #12)
> Created attachment 82111 [details] [review] [review]
> Bug 21413: Call AddBiblio in list context
> 
> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Follow up pushed to master
Comment 14 Tomás Cohen Arazi 2018-11-09 14:07:48 UTC
Created attachment 82168 [details] [review]
Bug 21413: (QA follow-up) Fix tests

No assumption on the order in which restults are returned should be made
(we don't control existing data on the tests). So it should only check
existence of expected records in the results, and absense.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 15 Martin Renvoize 2018-11-16 13:47:31 UTC
The enhancement will not be backported to 18.05.x series.