Bug 17554

Summary: Move GetBorrowersWithEmail to Koha::Patron
Product: Koha Reporter: Jonathan Druart <jonathan.druart+koha>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart+koha>
Status: CLOSED FIXED QA Contact: Tomás Cohen Arazi <tomascohen>
Severity: enhancement    
Priority: P5 - low CC: fridolin.somers, martin.renvoize, tomascohen
Version: master   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18144
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 17486    
Bug Blocks: 16846, 17829    
Attachments: Bug 17554: Koha::Patrons - Remove GetBorrowersWithEmail
Bug 17554: Koha::Patrons - Remove GetBorrowersWithEmail
Bug 17554: Koha::Patrons - Remove GetBorrowersWithEmail
Bug 17554: Koha::Patrons - Remove GetBorrowersWithEmail
Bug 17554: Koha::Patrons - Remove GetBorrowersWithEmail
Bug 17554: Koha::Patrons - Remove GetBorrowersWithEmail
Bug 17554: (followup) Shibboleth check should use ->find too

Description Jonathan Druart 2016-11-04 14:42:23 UTC
C4::Members::GetBorrowersWithEmail can be easily replaced with Koha::Patrons->search({ email => $email });
Comment 1 Jonathan Druart 2016-11-04 14:48:31 UTC
Created attachment 57207 [details] [review]
Bug 17554: Koha::Patrons - Remove GetBorrowersWithEmail

C4::Members::GetBorrowersWithEmail can be easily replaced with
Koha::Patrons->search({ email => $email });

Test plan:
Confirm that you are still able to use Persona for login
http://translate.koha-community.org/manual/master/en/html-desktop/#mozillapersona

For QA: Note that this is also use for the PKI authentication
But as the code is the same I don't think it's needed to test both.
Comment 2 Jonathan Druart 2016-11-04 14:49:53 UTC
Created attachment 57208 [details] [review]
Bug 17554: Koha::Patrons - Remove GetBorrowersWithEmail

C4::Members::GetBorrowersWithEmail can be easily replaced with
Koha::Patrons->search({ email => $email });

Test plan:
Confirm that you are still able to use Persona for login
http://translate.koha-community.org/manual/master/en/html-desktop/#mozillapersona

For QA: Note that this is also use for the PKI authentication
But as the code is the same I don't think it's needed to test both.
Comment 3 Jonathan Druart 2016-12-14 17:38:01 UTC
Created attachment 58184 [details] [review]
Bug 17554: Koha::Patrons - Remove GetBorrowersWithEmail

C4::Members::GetBorrowersWithEmail can be easily replaced with
Koha::Patrons->search({ email => $email });

Test plan:
Confirm that you are still able to use PKI authentication
Comment 4 Jonathan Druart 2016-12-29 10:10:03 UTC
Created attachment 58486 [details] [review]
Bug 17554: Koha::Patrons - Remove GetBorrowersWithEmail

C4::Members::GetBorrowersWithEmail can be easily replaced with
Koha::Patrons->search({ email => $email });

Test plan:
Confirm that you are still able to use PKI authentication
Comment 5 Jonathan Druart 2017-02-24 09:04:45 UTC
Alternative test plan: read the changes and confirm that they make sense.
Comment 6 Martin Renvoize 2017-05-02 09:25:32 UTC
Looks like a solid change to me, but I can't get it to apply :(
Comment 7 Jonathan Druart 2017-05-02 13:05:56 UTC
Created attachment 62956 [details] [review]
Bug 17554: Koha::Patrons - Remove GetBorrowersWithEmail

C4::Members::GetBorrowersWithEmail can be easily replaced with
Koha::Patrons->search({ email => $email });

Test plan:
Confirm that you are still able to use PKI authentication
Comment 8 Tomás Cohen Arazi 2017-06-26 18:27:31 UTC
Created attachment 64660 [details] [review]
Bug 17554: Koha::Patrons - Remove GetBorrowersWithEmail

C4::Members::GetBorrowersWithEmail can be easily replaced with
Koha::Patrons->search({ email => $email });

Test plan:
Confirm that you are still able to use PKI authentication

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 9 Tomás Cohen Arazi 2017-06-26 18:27:39 UTC
Created attachment 64661 [details] [review]
Bug 17554: (followup) Shibboleth check should use ->find too

There was a remaining use of C4::Members::GetBorrowersWithEmail in Auth.pm.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 10 Tomás Cohen Arazi 2017-06-26 18:29:20 UTC
Simple patch, pretty trivial.
Comment 11 Jonathan Druart 2017-07-05 17:05:06 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 12 Fridolin Somers 2017-07-10 10:13:57 UTC
Enhancement not pushed to 17.05.x
Comment 13 Fridolin Somers 2017-07-10 10:25:23 UTC
Enhancement not pushed to 17.05.x