Bug 15656 - Move the guarantor/guarantees code to Koha::Patron
Summary: Move the guarantor/guarantees code to Koha::Patron
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 15548 15653
Blocks: 15449 14577 16073 16136 16844
  Show dependency treegraph
 
Reported: 2016-01-25 15:40 UTC by Jonathan Druart
Modified: 2017-12-07 22:16 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 15656: Move guarantor/guarantees code - GetGuarantees (10.70 KB, patch)
2016-01-25 15:56 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15656: Move guarantor/guarantees code - GetMemberRelatives (7.54 KB, patch)
2016-01-25 15:56 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15656: Move guarantor/guarantees code - GetGuarantees (10.75 KB, patch)
2016-02-16 10:36 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 15656: Move guarantor/guarantees code - GetMemberRelatives (7.60 KB, patch)
2016-02-16 10:36 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 15656: Move guarantor/guarantees code - GetGuarantees (10.81 KB, patch)
2016-03-11 18:36 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 15656: Move guarantor/guarantees code - GetMemberRelatives (7.65 KB, patch)
2016-03-11 18:36 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 15656 [QA Followup] - Return without searching if patron has no guarantor (2.04 KB, patch)
2016-03-11 18:37 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2016-01-25 15:40:42 UTC
2 subroutines of C4::Members deal with guarantor/guarantees: GetGuarantees and GetMemberRelatives.
Since we already have a Koha::Patron->guarantor method, it makes sense to move these 2 subroutines to this module.
Comment 1 Jonathan Druart 2016-01-25 15:56:28 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2016-01-25 15:56:31 UTC Comment hidden (obsolete)
Comment 3 Josef Moravec 2016-02-16 10:36:15 UTC Comment hidden (obsolete)
Comment 4 Josef Moravec 2016-02-16 10:36:22 UTC Comment hidden (obsolete)
Comment 5 Kyle M Hall 2016-03-11 18:36:51 UTC
Created attachment 49054 [details] [review]
Bug 15656: Move guarantor/guarantees code - GetGuarantees

2 subroutines of C4::Members deal with guarantor/guarantees:
GetGuarantees and GetMemberRelatives.
Since we already have a Koha::Patron->guarantor method, it makes sense
to move these 2 subroutines to this module.

This first patch deals with GetGuarantees.

Test plan for the entire patch set:
1/ Create 5 patrons A (adult), B (child), C (child), D (child), E
(child), F (adult)
2/ Add relation between them: A is father of B, C and D.
E does not have a guarantor
F does not have guarantees
3/ Check some items out for all of these patrons
4/ On the "Check out" and "Details" tabs, you should not see any
differences with these patch applied : The "Relatives' checkouts" tabs
should list all of the guarantor/guarantee/siblings checkouts

Note:
$template->param('C' => 1);
I have not found any reference of this 'C' in the template.
It seems it's an old c/p from members/memberentrygen.tt

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 6 Kyle M Hall 2016-03-11 18:36:58 UTC
Created attachment 49055 [details] [review]
Bug 15656: Move guarantor/guarantees code - GetMemberRelatives

Note:
QA question: Does the Koha::Patron->siblings method should return undef
if there is no guarantor?
It would avoid the weird  != undef, = $borrowernumber conditions.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 7 Kyle M Hall 2016-03-11 18:37:01 UTC
Created attachment 49056 [details] [review]
Bug 15656 [QA Followup] - Return without searching if patron has no guarantor

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 8 Brendan Gallagher 2016-03-12 23:40:42 UTC
Pushed to Master - Should be in the May 2016 release.  Thanks!