Bug 7025

Summary: C4::Items depends on C4::Reserves (which in turn depends on C4::Items...)
Product: Koha Reporter: Ian Walls <koha.sekjal>
Component: Architecture, internals, and plumbingAssignee: Ian Walls <koha.sekjal>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: normal    
Priority: P5 - low    
Version: 3.6   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on:    
Bug Blocks: 6875    

Description Ian Walls 2011-10-13 15:29:49 UTC
C4::Items uses a single subroutine from C4::Reserves, CheckReserves(), in a single on of it's subroutines, GetItemsInfo().  The only data exported is in the field "count_reserves" which gives the reserve status.  This in turn is only used  in opac/opac-detail.pl to display "on hold" in the holdings table if the item is currently waiting on the holds shelf to be picked up.  There are no other uses of this information.

We can remove CheckReserves() from GetItemsInfo(), and add a different call in opac/opac-details.pl to get whether the particular item is on hold or not.  This will remove a circular dependency, likely speeding up the overall code (as we won't need to load all of C4::Reserves every time we load C4::Items).
Comment 1 Owen Leonard 2014-07-11 12:32:56 UTC
This appears to have been fixed by a patch on Bug 6875.