Bug 26523

Summary: In reserve/request.pl biblioitemnumber is used where biblionumber is required.
Product: Koha Reporter: Andreas Jonsson <andreas.jonsson>
Component: CirculationAssignee: Bugs List <koha-bugs>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: gmcharlt, jonathan.druart, kyle.m.hall, martin.renvoize, nick, nugged
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26518
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 24185    
Bug Blocks:    

Description Andreas Jonsson 2020-09-23 18:01:21 UTC
In the fix of bug 24185, (commit 18ad5f5eea8aab8414783f4b75408cfebd2518da) bibliotemnumber is used where biblionumber is required.  The consequence is that ItemsAnyAvailableAndNotRestricted is called on the wrong record.
Comment 1 Jonathan Druart 2020-09-29 08:19:45 UTC
biblioitemnumber and biblionumber must be contain the same value. If not you are going to face some oddities.
Comment 2 Andreas Jonsson 2020-09-30 13:25:33 UTC
There is nothing enforcing the sameness of these two identifiers and they typically are not the same on any of our installations.

(If the relationship between biblio and biblioitem is one-to-one I think that biblioitemnumber should be removed as it only provokes this type of coding errors.)
Comment 3 Katrin Fischer 2020-09-30 15:20:09 UTC
The relationship is 1:1 in modern Koha, but it didn't use to be. The change is not so easy overall, but it has been discussed to merge tables many times I think.

I am not sure why they are not the same in your dbs - they are in ours. It means, sometime they must have gotten out of sync.
Comment 4 Nick Clemens (kidclamp) 2020-10-01 16:56:34 UTC
Bug 26518 - it is quite easy to get these numbers out of sync
Comment 5 Martin Renvoize 2021-01-12 13:41:59 UTC
I think we can safely de-escalate this one.. bug 26518 goes a long way to preventing the fields from getting out of sync and we can continue working on removing biblioitemnumber entirely in due course.
Comment 6 Jonathan Druart 2021-04-15 06:40:23 UTC

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