Bug 28973

Summary: Improve Koha::Patron::can_see_patron_infos efficiency
Product: Koha Reporter: Kyle M Hall <kyle>
Component: PatronsAssignee: Kyle M Hall <kyle>
Status: RESOLVED FIXED QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low CC: fridolin.somers, gmcharlt, kyle.m.hall, martin.renvoize, victor
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Text to go in the release notes:
Version(s) released in:
21.11.00,21.05.05,20.11.12
Bug Depends on: 18403    
Bug Blocks:    
Attachments: Bug 28973: Improve Koha::Patron::can_see_patron_infos efficiency
Bug 28973: Improve Koha::Patron::can_see_patron_infos efficiency
Bug 28973: Improve Koha::Patron::can_see_patron_infos efficiency

Description Kyle M Hall 2021-09-08 12:31:34 UTC
The method can_see_patron_infos looks up a row in the branches table by branchcode just to get the branchcode it already has. This seems inefficient.
Comment 1 Kyle M Hall 2021-09-08 12:32:41 UTC
Created attachment 124654 [details] [review]
Bug 28973: Improve Koha::Patron::can_see_patron_infos efficiency

The method can_see_patron_infos looks up a row in the branches table by branchcode just to get the branchcode it already has. This seems inefficient.

Test Plan:
1) Apply this patch
2) No changes should be noted
Comment 2 Kyle M Hall 2021-09-08 12:46:16 UTC
Created attachment 124656 [details] [review]
Bug 28973: Improve Koha::Patron::can_see_patron_infos efficiency

The method can_see_patron_infos looks up a row in the branches table by branchcode just to get the branchcode it already has. This seems inefficient.

Test Plan:
1) Apply this patch
2) No changes should be noted
Comment 3 Martin Renvoize 2021-11-02 15:19:08 UTC
Created attachment 127218 [details] [review]
Bug 28973: Improve Koha::Patron::can_see_patron_infos efficiency

The method can_see_patron_infos looks up a row in the branches table by branchcode just to get the branchcode it already has. This seems inefficient.

Test Plan:
1) Apply this patch
2) No changes should be noted

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 4 Martin Renvoize 2021-11-02 15:19:35 UTC
This is a no brainer.. straight to PQA
Comment 5 Jonathan Druart 2021-11-03 14:31:39 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 6 Kyle M Hall 2021-11-05 18:10:04 UTC
Pushed to 21.05.x for 21.05.05
Comment 7 Fridolin Somers 2021-11-11 01:48:47 UTC
Pushed to 20.11.x for 20.11.12
Comment 8 Victor Grousset/tuxayo 2021-11-16 08:13:22 UTC
Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed.