Bug 24463 - Consistent accessor-relationship naming for basket_group in Basket.pm
Summary: Consistent accessor-relationship naming for basket_group in Basket.pm
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 24464
  Show dependency treegraph
 
Reported: 2020-01-20 14:53 UTC by Tomás Cohen Arazi
Modified: 2020-04-03 21:26 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
20.05.00


Attachments
Bug 24463: Add a basket_group relationship for baskets (1.78 KB, patch)
2020-01-20 14:58 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 24463: Add a basket_group relationship for baskets (1.83 KB, patch)
2020-02-03 08:04 UTC, David Nind
Details | Diff | Splinter Review
Bug 24463: Add a basket_group relationship for baskets (1.90 KB, patch)
2020-03-23 09:55 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 2020-01-20 14:53:41 UTC
We agreed there needs to be consistency. This will be a blocker for dealing with related data from the API (prefetching, filternig, etC).
Comment 1 Tomás Cohen Arazi 2020-01-20 14:58:22 UTC
Created attachment 97628 [details] [review]
Bug 24463: Add a basket_group relationship for baskets

This patch aims to bring consistency between the accessor name and the
underlying relationship to ease things when using it from the API.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Acquisition/Basket.t
=> SUCCESS: Tests pass! No behavior change!
3. Sign off :-D
Comment 2 David Nind 2020-02-03 08:04:53 UTC
Created attachment 98273 [details] [review]
Bug 24463: Add a basket_group relationship for baskets

This patch aims to bring consistency between the accessor name and the
underlying relationship to ease things when using it from the API.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Acquisition/Basket.t
=> SUCCESS: Tests pass! No behavior change!
3. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Jonathan Druart 2020-02-04 11:05:04 UTC
If we agree with such naming conventions (ie. create the rs when the DB column is poorly named), I think we should have a global plan, and do it widely. I do not think we should have 1 bug report per rs.
Comment 4 Tomás Cohen Arazi 2020-02-04 13:15:52 UTC
(In reply to Jonathan Druart from comment #3)
> If we agree with such naming conventions (ie. create the rs when the DB
> column is poorly named), I think we should have a global plan, and do it
> widely. I do not think we should have 1 bug report per rs.

I started adding them as needed on the bugs that will actually take advantage of it.
Comment 5 Jonathan Druart 2020-02-26 14:32:41 UTC
(In reply to Tomás Cohen Arazi from comment #4)
> (In reply to Jonathan Druart from comment #3)
> > If we agree with such naming conventions (ie. create the rs when the DB
> > column is poorly named), I think we should have a global plan, and do it
> > widely. I do not think we should have 1 bug report per rs.
> 
> I started adding them as needed on the bugs that will actually take
> advantage of it.

But you don't, this bug report only renames the DBIC rs.
Comment 6 Katrin Fischer 2020-03-22 11:46:01 UTC
I see that this is the start of a tree of patches - Joubu, can we continue here?
Comment 7 Jonathan Druart 2020-03-23 09:55:06 UTC
Created attachment 101408 [details] [review]
Bug 24463: Add a basket_group relationship for baskets

This patch aims to bring consistency between the accessor name and the
underlying relationship to ease things when using it from the API.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Acquisition/Basket.t
=> SUCCESS: Tests pass! No behavior change!
3. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 8 Martin Renvoize 2020-03-24 09:30:07 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 9 Joy Nelson 2020-04-03 21:26:33 UTC
enhancement not backported to 19.11.x