[Bug 7060] New: All instances of GetMemberDetails are unnecessary in C4::Circulation
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7060 Bug #: 7060 Summary: All instances of GetMemberDetails are unnecessary in C4::Circulation Classification: Unclassified Change sponsored?: --- Product: Koha Version: unspecified Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P5 Component: Architecture, internals, and plumbing AssignedTo: ian.walls@bywatersolutions.com ReportedBy: ian.walls@bywatersolutions.com QAContact: koha-bugs@lists.koha-community.org Blocks: 7058 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 -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7060 --- Comment #1 from Ian Walls <ian.walls@bywatersolutions.com> 2011-10-19 00:00:45 UTC --- Created attachment 5969 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=5969 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 -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7060 Ian Walls <ian.walls@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 |PATCH-Sent Patch Status|--- |Needs Signoff -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7060 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #5969|0 |1 is obsolete| | --- Comment #2 from Nicole C. Engard <nengard@gmail.com> 2011-10-19 19:48:40 UTC --- Created attachment 5996 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=5996 [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> -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7060 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nengard@gmail.com Patch Status|Needs Signoff |Signed Off -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7060 Ian Walls <ian.walls@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Signed Off |Passed QA --- Comment #3 from Ian Walls <ian.walls@bywatersolutions.com> 2011-10-19 22:18:16 UTC --- Marking Passed QA, RM please verify -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7060 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz Patch Status|Passed QA |Patch Pushed Severity|enhancement |minor --- Comment #4 from Chris Cormack <chris@bigballofwax.co.nz> 2011-10-20 01:10:28 UTC --- Pushed, please test -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7060 --- Comment #5 from Ian Walls <ian.walls@bywatersolutions.com> 2011-10-21 14:47:30 UTC --- 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... -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7060 Ian Walls <ian.walls@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Patch Pushed |Needs Signoff Severity|minor |blocker -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7060 --- Comment #6 from Ian Walls <ian.walls@bywatersolutions.com> 2011-10-21 14:54:38 UTC --- Created attachment 6017 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=6017 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. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7060 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Needs Signoff |Patch Pushed --- Comment #7 from Chris Cormack <chris@bigballofwax.co.nz> 2011-10-21 15:09:13 UTC --- Follow up pushed -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7060 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org