GetMemberDetails is used in the following C4::Circulation subroutines CanBookBeIssued: used twice, both times only cardnumber, surname, firstname, and borrowernumber are used, which are all accessible more efficiently from GetMember AddReturn: only borrowernumber and cardnumber are used. the $borrower hashref is returned by AddReturn, but it is only captured in tools/inventory.pl and C4/SIP/ILS/Transaction/Checkin.pm, and in neither place is anything done with it. GetMember could be used here without any issue AddRenewal: uses only passes the $borrower object to CalcDateDue, which only uses categorycode and dateexpiry (both covered by GetMember hashref) AddIssue: uses an incoming $borrower object, but only the borrowernumber and categorycode fields, so we only need a GetMember object here. GetRenewalCount: only uses categorycode Changing all calls of GetMemberDetails to GetMember in C4/Circulation.pm should be safe, and vastly more efficient
Created attachment 5969 [details] [review] Proposed patch Replaces all instances of GetMemberDetails in C4/Circulation.pm with GetMember, for efficiency. Test plan: 1. Check out a material 2. Renew a material 3. Return a material all three steps should return error free
Created attachment 5996 [details] [review] [SIGNED-OFF] Bug 7060: GetMemberDetails unnecessary in C4::Circulation Replaces all instances of GetMemberDetails with the more efficient GetMember. Since no hash values other than the borrowers table's fields are used in this module, the transition is safe. To test: 1. Checkout a material; the page should load without error 2. Renew a material: the page should load without error 3. Return a material: the page should load without error The above test plan invokes all the subroutines affected by this patch; any call to an undefined value in a hashref should give a warning Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Marking Passed QA, RM please verify
Pushed, please test
I made a mistake. $borrower->{flags} are used by AddReturn in circ/returns.pl. GetMemberDetails must be used, otherwise returns break. working on fix now...
Created attachment 6017 [details] [review] Followup Patch Restores GetMemberDetails usage in AddReturn; since that subroutine returned the borrower object, it was a mistake to change to GetMember, since key things like flags are not returned in that hashref.
Follow up pushed