Bug 24106

Summary: In returns.pl, don't search for item if no barcode is provided
Product: Koha Reporter: Kyle M Hall <kyle>
Component: Architecture, internals, and plumbingAssignee: Kyle M Hall <kyle>
Status: CLOSED FIXED QA Contact: Tomás Cohen Arazi <tomascohen>
Severity: normal    
Priority: P5 - low CC: 1joynelson, lucas, tomascohen, wizzyrea
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23541
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
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
Bug 24106: In returns.pl, don't search for item if no barcode is provided
Bug 24106: In returns.pl, don't search for item if no barcode is provided

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