https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39819
Bug ID: 39819
Summary: Additional performance improvements for when loading
borrower relationships.
Change sponsored?: ---
Product: Koha
Version: Main
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P5 - low
Component: Patrons
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
CC: [email protected], [email protected]
From Nick via Bug 39644:
I think there is more cleanup to be done here.
relationships_debt is only called twice in the code base:
once in moremember.pl
once in Koha::Patron->is_patron_inside_charge_limits (which is also called in
moremember)
The two calls are:
- moremember:
$patron->relationships_debt( { include_guarantors => 0, only_this_guarantor
=> 1, include_this_patron => 1 } );
- is_patron_inside_charge_limits:
$patron->relationships_debt( { include_guarantors => 1, only_this_guarantor
=> 0, include_this_patron => 1 } );
The difference being that the first returns only the single patrons fine +
their guarantees, the latter returns the patron and thier gusarantees and the
guarantees other guarantors
The first being a subset of the second, we should be able to return this
additional info from "is_patron_inside_charge_limits" and avoid a double call.
Additionally, moremember does checks against
"NoIssuesChargeGuarantorsWithGuarantees" and "NoIssuesChargeGuarantees" - both
of which are checked inside "is_patron_inside_charge_limits" so we can simply
use values we are already calculating and not calculate them again
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
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/