Bug 14046 - CheckIfIssuedToPatron fails if biblionumber != biblioitemnumber
Summary: CheckIfIssuedToPatron fails if biblionumber != biblioitemnumber
Status: CLOSED 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: Jonathan Druart
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-22 14:10 UTC by Tomás Cohen Arazi
Modified: 2015-12-03 22:02 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 14046: Make the CheckIfIssuedToPatron using the biblionumber (1.51 KB, patch)
2015-04-22 14:11 UTC, Jonathan Druart
Details | Diff | Splinter Review
[SIGNED OFF] Bug 14046: Make the CheckIfIssuedToPatron using the biblionumber (1.58 KB, patch)
2015-04-22 14:19 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
[PASSED QA] Bug 14046: Make the CheckIfIssuedToPatron using the biblionumber (1.64 KB, patch)
2015-04-22 15:33 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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