Bug 30294

Summary: Rename Koha::Recall->* used relationship names
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: minor    
Priority: P5 - low CC: kyle
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: 19532    
Bug Blocks:    
Attachments: Bug 30294: Rename Koha::Recall->* used relationship names
Bug 30294: Rename Koha::Recall->* used relationship names
Bug 30294: Rename Koha::Recall->* used relationship names

Description Tomás Cohen Arazi 2022-03-14 17:45:23 UTC
Our coding guidelines are not quite precise regarding this, but in order to make accessors for related objects embeddable/searchable on the REST API, the relationships should share the name with the method, as the 'sub biblio' example in the guidelines:

https://wiki.koha-community.org/wiki/Coding_Guidelines#Koha::Object.28s.29
Comment 1 Tomás Cohen Arazi 2022-03-14 17:50:02 UTC
Created attachment 131670 [details] [review]
Bug 30294: Rename Koha::Recall->* used relationship names

This patch renames the underlaying relationship names used in the
'patron' and 'library' subs so they are more clearly prefetchable and
also enabling them to be embeddable and searchable through an eventual
API route for recalls.

To test:
1. Apply the patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Recall*
=> SUCCESS: Tests pass, nothing really changes
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 2 Fridolin Somers 2022-03-18 06:51:09 UTC
Created attachment 131854 [details] [review]
Bug 30294: Rename Koha::Recall->* used relationship names

This patch renames the underlaying relationship names used in the
'patron' and 'library' subs so they are more clearly prefetchable and
also enabling them to be embeddable and searchable through an eventual
API route for recalls.

To test:
1. Apply the patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Recall*
=> SUCCESS: Tests pass, nothing really changes
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Comment 3 Jonathan Druart 2022-03-21 12:59:10 UTC
Created attachment 131964 [details] [review]
Bug 30294: Rename Koha::Recall->* used relationship names

This patch renames the underlaying relationship names used in the
'patron' and 'library' subs so they are more clearly prefetchable and
also enabling them to be embeddable and searchable through an eventual
API route for recalls.

To test:
1. Apply the patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Recall*
=> SUCCESS: Tests pass, nothing really changes
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Fridolin Somers 2022-03-23 20:50:59 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄