Bug 30294 - Rename Koha::Recall->* used relationship names
Summary: Rename Koha::Recall->* used relationship names
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low minor (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Testopia
URL:
Keywords:
Depends on: 19532
Blocks:
  Show dependency treegraph
 
Reported: 2022-03-14 17:45 UTC by Tomás Cohen Arazi
Modified: 2022-12-12 21:23 UTC (History)
1 user (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 30294: Rename Koha::Recall->* used relationship names (2.06 KB, patch)
2022-03-14 17:50 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30294: Rename Koha::Recall->* used relationship names (2.12 KB, patch)
2022-03-18 06:51 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 30294: Rename Koha::Recall->* used relationship names (2.20 KB, patch)
2022-03-21 12:59 UTC, Jonathan Druart
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-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 🦄