Bug 28973 - Improve Koha::Patron::can_see_patron_infos efficiency
Summary: Improve Koha::Patron::can_see_patron_infos efficiency
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: master
Hardware: All All
: P5 - low trivial (vote)
Assignee: Kyle M Hall
QA Contact: Testopia
URL:
Keywords:
Depends on: 18403
Blocks:
  Show dependency treegraph
 
Reported: 2021-09-08 12:31 UTC by Kyle M Hall
Modified: 2022-06-06 20:25 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.11.00,21.05.05,20.11.12


Attachments
Bug 28973: Improve Koha::Patron::can_see_patron_infos efficiency (1.03 KB, patch)
2021-09-08 12:32 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 28973: Improve Koha::Patron::can_see_patron_infos efficiency (1.01 KB, patch)
2021-09-08 12:46 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 28973: Improve Koha::Patron::can_see_patron_infos efficiency (1.06 KB, patch)
2021-11-02 15:19 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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.