Bug 29847 - Koha::Patron::HouseboundProfile->housebound_visits should return a resultset
Summary: Koha::Patron::HouseboundProfile->housebound_visits should return a resultset
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Testopia
URL:
Keywords:
Depends on: 29844
Blocks:
  Show dependency treegraph
 
Reported: 2022-01-11 13:58 UTC by Tomás Cohen Arazi
Modified: 2022-12-12 21:23 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00


Attachments
Bug 29847: Make Koha::Patron::HouseboundProfile->housebound_visits return a resultset (5.34 KB, patch)
2022-02-02 13:44 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 29847: Make Koha::Patron::HouseboundProfile->housebound_visits return a resultset (5.41 KB, patch)
2022-02-03 13:06 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 Tomás Cohen Arazi 2022-01-11 13:58:28 UTC
This method incorrectly converts the underlying resultset into an arrayref.
Comment 1 Tomás Cohen Arazi 2022-02-02 13:44:46 UTC
Created attachment 130105 [details] [review]
Bug 29847: Make Koha::Patron::HouseboundProfile->housebound_visits return a resultset

This patch makes the method consistent with the rest of the codebase, by
making it return a proper resultset.

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/Patron/HouseboundProfiles.t
=> SUCCESS: Tests pass!
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass!
4. Check the UI hasn't got broken either.
=> SUCCESS: It hasn't!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 2 Martin Renvoize 2022-02-03 09:38:08 UTC
OOh, thanks for jumping on this Tomas.. I'll have a look today :)
Comment 3 Martin Renvoize 2022-02-03 13:06:18 UTC
Created attachment 130140 [details] [review]
Bug 29847: Make Koha::Patron::HouseboundProfile->housebound_visits return a resultset

This patch makes the method consistent with the rest of the codebase, by
making it return a proper resultset.

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/Patron/HouseboundProfiles.t
=> SUCCESS: Tests pass!
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass!
4. Check the UI hasn't got broken either.
=> SUCCESS: It hasn't!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 4 Martin Renvoize 2022-02-03 14:07:32 UTC
Tests passing, QA script happy and functionality unaffected.. all working great.

Going straight for QA on this trivial improvement.

Pass
Comment 5 Fridolin Somers 2022-02-10 01:36:31 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄