Koha/tools
Nick Clemens 41580a0a58 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>
2024-01-17 10:43:36 +01:00
..
csv-profiles
access_files.pl Bug 33341: Address some perlcritic errors in 5.36 2023-03-28 14:50:33 +02:00
additional-contents.pl Bug 31383: (QA follow-up) Tidy 2023-10-20 14:44:03 -03:00
ajax-inventory.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
automatic_item_modification_by_age.pl Bug 22827: Add age dependency on other fields than dateaccessioned 2022-04-08 15:49:16 +02:00
batch_delete_records.pl Bug 29697: Replace GetMarcBiblio occurrences with $biblio->metadata->record 2022-07-22 15:24:11 -03:00
batch_extend_due_dates.pl Bug 26978: Add item type option to batch extend due date tool 2023-10-11 12:13:03 -03:00
batch_record_modification.pl Bug 29771: Scalar context for split 2022-03-08 23:03:34 -10:00
batch_records_ajax.pl Bug 22785: Allow option to choose which record match is applied during import 2022-05-03 11:19:50 -10:00
batchMod.pl Bug 34257: (QA follow-up): tidy up code 2023-09-12 09:45:05 -03:00
cleanborrowers.pl Bug 34441: Fixed Typo "Paramater" 2023-09-01 11:23:21 -03:00
copy-holidays.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
csv-profiles.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
exceptionHolidays.pl Bug 33667: Allow copying holidays to all libraries when editing 2023-07-06 10:08:45 -03:00
export.pl Bug 25503: Add option to export items bundle contents in checkouts table 2023-05-10 15:26:20 -03:00
holidays.pl Bug 30718: Use flatpickr's altInput 2022-08-19 08:26:31 -03:00
import_borrowers.pl Bug 27920: (QA follow-up) Change radios to a single select pulldown 2022-11-09 14:37:24 -03:00
inventory.pl Bug 35641: Reduce DB lookups when sending a list of barcodes to inventory 2024-01-17 10:43:36 +01:00
letter.pl Bug 32986: (follow-up) Tidy conditional in letter.pl 2023-11-08 17:59:34 -03:00
manage-marc-import.pl Bug 33412: Fix comparison when checking for overlay framework 2023-05-09 10:58:04 -03:00
marc_modification_templates.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
modborrowers.pl Bug 34818: (bug 21083 follow-up) Fix batch patron modification tool 2023-09-19 16:34:15 -03:00
newHolidays.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
overduerules.pl Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
page.pl Bug 31383: Create a parent-child DB relation for additional content 2023-10-20 14:43:56 -03:00
picture-upload.pl Bug 33341: Address some perlcritic errors in 5.36 2023-03-28 14:50:33 +02:00
problem-reports.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
quotes-upload.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
quotes.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
scheduler.pl Bug 34349: Validate/escape inputs for task scheduler 2023-09-25 18:18:38 -03:00
showdiffmarc.pl Bug 31526: Follow-up for bug 29697 2022-09-16 10:25:48 -03:00
stage-marc-import.pl Bug 33755: Set profile_id and add missing import 2023-08-15 12:16:59 +03:00
stockrotation.pl Bug 34773: Improve translation of title tags: Cataloging tools 2023-11-06 08:42:44 -03:00
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 16:43:25 -03:00
upload-file.pl Bug 28785: Adjust check_cookie_auth calls 2021-10-18 11:28:41 +02:00
upload.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
viewlog.pl Bug 32037: Check for existence of object before building link 2022-11-04 19:18:54 -03:00