Bug 24106 - In returns.pl, don't search for item if no barcode is provided
Summary: In returns.pl, don't search for item if no barcode is provided
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Kyle M Hall
QA Contact: Tomás Cohen Arazi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-25 18:18 UTC by Kyle M Hall
Modified: 2020-06-04 20:38 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.01


Attachments
Bug 24106: In returns.pl, don't search for item if no barcode is provided (2.43 KB, patch)
2019-11-25 18:20 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 24106: In returns.pl, don't search for item if no barcode is provided (2.46 KB, patch)
2019-11-25 19:27 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 24106: In returns.pl, don't search for item if no barcode is provided (2.51 KB, patch)
2019-11-29 15:03 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 Kyle M Hall 2019-11-25 18:18:01 UTC
When loading returns.pl, code to check rotating collections fires off an search for items by barcode, but doesn't check for a barcode first. This means the code will search for items where barcode is NULL, which is definitely not the intended function.
Comment 1 Kyle M Hall 2019-11-25 18:20:36 UTC
Created attachment 95805 [details] [review]
Bug 24106: In returns.pl, don't search for item if no barcode is provided

When loading returns.pl, code to check rotating collections fires off an search for items by barcode, but doesn't check for a barcode first. This means the code will search for items where barcode is NULL, which is definitely not the intended function.

Test Plan:
1) Apply this patch
2) Set up a rotating collection with items
3) Transfer the collection
4) Check in a rotating collection item
5) Note no change in functionality
Comment 2 Liz Rea 2019-11-25 19:27:40 UTC
Created attachment 95806 [details] [review]
Bug 24106: In returns.pl, don't search for item if no barcode is provided

When loading returns.pl, code to check rotating collections fires off an search for items by barcode, but doesn't check for a barcode first. This means the code will search for items where barcode is NULL, which is definitely not the intended function.

Test Plan:
1) Apply this patch
2) Set up a rotating collection with items
3) Transfer the collection
4) Check in a rotating collection item
5) Note no change in functionality

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Comment 3 Tomás Cohen Arazi 2019-11-29 15:03:14 UTC
Created attachment 95883 [details] [review]
Bug 24106: In returns.pl, don't search for item if no barcode is provided

When loading returns.pl, code to check rotating collections fires off an search for items by barcode, but doesn't check for a barcode first. This means the code will search for items where barcode is NULL, which is definitely not the intended function.

Test Plan:
1) Apply this patch
2) Set up a rotating collection with items
3) Transfer the collection
4) Check in a rotating collection item
5) Note no change in functionality

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 4 Liz Rea 2019-12-02 15:01:14 UTC
It appears that this can cause Koha to hang looking for all the null barcode items when processing holds, enough retries and all of the plack processes get eaten up.

It doesn't happen for every library, however, so it must be related to a system preference, which I have not tracked down (yet).
Comment 5 Martin Renvoize 2019-12-13 14:07:31 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 6 Joy Nelson 2019-12-19 22:06:17 UTC
Pushed to 19.11.01
Comment 7 Lucas Gass 2019-12-20 18:15:39 UTC
backported to 19.05.x for 19.05.06