[Koha-bugs] [Bug 35641] Reduce DB calls when performing inventory on a list of barcodes

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Dec 22 18:02:12 CET 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35641

ByWater Sandboxes <bws.sandboxes at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #160241|0                           |1
        is obsolete|                            |

--- Comment #2 from ByWater Sandboxes <bws.sandboxes at gmail.com> ---
Created attachment 160262
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160262&action=edit
Bug 35641: Reduce DB lookups when sending a list of barcodes to inventory

This patch does three things:
1 - Removes a specific query for withdrawn status of each item scanned - we can
use the withdrawn field
2 - Removes a specific query for checkouts on each item scanned - we can use
the onloan field
    a - additionally we don't need to fetch the checkout as we check it in to
the homebranch,
    this is likely incorrect - we should use the current branch, but I preserve
behavior for now
3 - Fetches the items ahead of time and builds a hash based on barcode, reduces
DB lookups, may raise memory usage

To test:
1 - Checkout some items
2 - Withdraw some items
3 - Generate a lsit of barcodes including some checked out items and some
withdrawn items
4 - Enter that list of barcodes into inventory tool
5 - Note your results
6 - Apply patch
7 - Issue the items again
8 - Repeat inventory
9 - Confirm results are the same as before patch

Signed-off-by: Andrew Fuerste-Henry <andrewfh at dubcolib.org>

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list