Bug 14046

Summary: CheckIfIssuedToPatron fails if biblionumber != biblioitemnumber
Product: Koha Reporter: Tomás Cohen Arazi <tomascohen>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: chris, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 14046: Make the CheckIfIssuedToPatron using the biblionumber
[SIGNED OFF] Bug 14046: Make the CheckIfIssuedToPatron using the biblionumber
[PASSED QA] Bug 14046: Make the CheckIfIssuedToPatron using the biblionumber

Description Tomás Cohen Arazi 2015-04-22 14:10:17 UTC
If for some reason biblionumber!=biblioitemnumber (it happens with test DB's) CheckIfIssuedToPatron fails. It's logic should be rewritten.
Comment 1 Jonathan Druart 2015-04-22 14:11:14 UTC Comment hidden (obsolete)
Comment 2 Tomás Cohen Arazi 2015-04-22 14:19:56 UTC Comment hidden (obsolete)
Comment 3 Kyle M Hall 2015-04-22 15:33:10 UTC
Created attachment 38348 [details] [review]
[PASSED QA] Bug 14046: Make the CheckIfIssuedToPatron using the biblionumber

C4::Circ::CheckIfIssuedToPatron called
  $items = GetItemsByBiblioitemnumber($biblionumber);
But if biblionumber != biblioitemnumber, the items retrieved were not
the good ones!

Test plan:
Make your Auto increment values for biblio and biblioitems differs
Launch the tests:
    prove t/db_dependent/Circulation/CheckIfIssuedToPatron.t

Before this patch, they did not pass.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 4 Tomás Cohen Arazi 2015-04-22 16:32:04 UTC
Patch pushed to master.

Thanks Jonathan!
Comment 5 Chris Cormack 2015-05-11 21:37:02 UTC
Pushed to 3.18.x will be in 3.18.7