Bug 28310

Summary: request.pl using biblioitemnumber in biblionumber field
Product: Koha Reporter: Blou <philippe.blouin>
Component: CirculationAssignee: Blou <philippe.blouin>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: caroline.cyr-la-rose, gmcharlt, kyle.m.hall
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 28310: request.pl using biblioitemnumber in biblionumber field

Description Blou 2021-05-10 15:49:33 UTC
In reserve/request.pl, the code querying ItemsAnyAvailableAndNotRestricted (previously ItemsAnyAvailableForHold) is passing the biblioitemnumber as a value to a specified biblionumber.

ItemsAnyAvailableAndNotRestricted( { biblionumber => $biblioitemnumber, patron => $patron })

All you need is a Koha instance where the values of biblionumber and biblioitemnumber being different for this to break.  And break badly.

This occurs in 20.05+
Comment 1 Blou 2021-05-10 15:51:34 UTC
Created attachment 120800 [details] [review]
Bug 28310: request.pl using biblioitemnumber in biblionumber field

In reserve/request.pl, the code querying ItemsAnyAvailableAndNotRestricted (previously ItemsAnyAvailableForHold)
is passing the biblioitemnumber as a value to a specified biblionumber.

>> ItemsAnyAvailableAndNotRestricted( { biblionumber => $biblioitemnumber, patron => $patron })

All you need is a Koha instance where the values of biblionumber and biblioitemnumber are not synchronized for this to break.  And break badly.
Comment 2 Owen Leonard 2021-05-10 16:27:41 UTC
Is this a duplicate of Bug 28057?
Comment 3 Blou 2021-05-10 17:09:48 UTC
As Owen said, duplicate

*** This bug has been marked as a duplicate of bug 28057 ***