Koha/tools
Nick Clemens a267c38a3f 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@dubcolib.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5ae5e4367b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 41580a0a58)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-02-02 17:51:54 +00:00
..
csv-profiles
access_files.pl
additional-contents.pl Bug 34368: Add CSRF token to Content Management pages 2023-07-28 09:12:39 -10:00
ajax-inventory.pl
automatic_item_modification_by_age.pl
background-job-progress.pl
batch_delete_records.pl
batch_extend_due_dates.pl Bug 26978: Add item type option to batch extend due date tool 2023-10-12 13:58:06 -10:00
batch_record_modification.pl
batch_records_ajax.pl
batchMod.pl Bug 34257: (QA follow-up): tidy up code 2023-09-14 08:06:26 -10:00
cleanborrowers.pl
copy-holidays.pl
csv-profiles.pl
exceptionHolidays.pl Bug 33667: Allow copying holidays to all libraries when editing 2023-07-17 16:42:42 +01:00
export.pl
holidays.pl
import_borrowers.pl
inventory.pl Bug 35641: Reduce DB lookups when sending a list of barcodes to inventory 2024-02-02 17:51:54 +00:00
letter.pl
manage-marc-import.pl
marc_modification_templates.pl
modborrowers.pl
newHolidays.pl
overduerules.pl
page.pl
picture-upload.pl
problem-reports.pl
quotes-upload.pl
quotes.pl
scheduler.pl Bug 34349: Validate/escape inputs for task scheduler 2023-09-26 21:25:13 -10:00
showdiffmarc.pl
stage-marc-import.pl Bug 33755: Set profile_id and add missing import 2023-08-17 10:07:49 -10:00
stockrotation.pl
tools-home.pl Bug 33595: (bug 26628 follow-up) Fix authorization for tools-home.pl 2023-05-16 11:47:15 +02:00
upload-cover-image.pl Bug 35291: (QA follow-up) Tidying script for QA test tools 2023-11-24 10:58:50 -10:00
upload-file.pl
upload.pl
viewlog.pl