Bug 29847

Summary: Koha::Patron::HouseboundProfile->housebound_visits should return a resultset
Product: Koha Reporter: Tomás Cohen Arazi <tomascohen>
Component: Architecture, internals, and plumbingAssignee: Tomás Cohen Arazi <tomascohen>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: jonathan.druart, kyle, martin.renvoize
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00
Bug Depends on: 29844    
Bug Blocks:    
Attachments: Bug 29847: Make Koha::Patron::HouseboundProfile->housebound_visits return a resultset
Bug 29847: Make Koha::Patron::HouseboundProfile->housebound_visits return a resultset

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 🦄