https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30085
--- Comment #17 from Nick Clemens <[email protected]> --- Created attachment 138058 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138058&action=edit Bug 30085: [21.11.x] Reduce scope of holds count / today holds count We retrieve two counts that are only needed if rules for hold limits are defined. The DB counts should only be fetched once the rules are confirmed to exist Further improvement would be possiblke by allowing them to be passed in (or cached?) from CanBookBeReserved as they rely only on patron/biblionumber and not item specific information Signed-off-by: Martin Renvoize <[email protected]> Signed-off-by: Jonathan Druart <[email protected]> Bug 30085: Don't fetch ReservesControlBranch twice We essentially copy the code from GetReservesControlBranch here, because we also calculate 'branchfield' Setting it to "" vs undef makes no difference in this code, so lets not fetch this again later. Rename the variable to make it clearer where the branchcode came from Signed-off-by: Martin Renvoize <[email protected]> Signed-off-by: Jonathan Druart <[email protected]> Bug 30085: Consolidate querycoutn code and only check if needed Similar to first patch, move a count only conditionally used into the conditional This could be updated to use DBIC, but the itemtype conditionals add complexity Signed-off-by: Martin Renvoize <[email protected]> Signed-off-by: Jonathan Druart <[email protected]> Bug 30085: Move IndependentBranches check sooner This doesn't rely on the other statuses, and requires only cached preference check, so lets allow the possibiliy of an early exit Signed-off-by: Martin Renvoize <[email protected]> Signed-off-by: Jonathan Druart <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
