Summary: | *_count methods should be avoided | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Architecture, internals, and plumbing | Assignee: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Status: | CLOSED FIXED | QA Contact: | Josef Moravec <josef.moravec> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | 1joynelson, agustinmoyano, josef.moravec, martin.renvoize, tomascohen |
Version: | Main | ||
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: |
20.05.00
|
|
Circulation function: | |||
Bug Depends on: | 24430, 24435, 24448, 24528 | ||
Bug Blocks: | 20212 | ||
Attachments: |
Bug 24467: Remove _count methods
Bug 24467: Remove _count methods introduced for API use Bug 24467: Remove _count methods introduced for API use Bug 24467: Remove _count methods introduced for API use Bug 24467: (QA follow-up) Fix POD in Koha::Biblio Bug 24467: (QA follow-up) Clarify tests wording for ->count methods |
Description
Jonathan Druart
2020-01-21 14:13:25 UTC
Removing the introduced *_count methods will be a follow-up for this new feature if that's ok with you, Jonathan. I mean part of this bug. Created attachment 97746 [details] [review] Bug 24467: Remove _count methods Add a trick to guess what we need to call. Note that it does not work, do not know why. Tests are missing to make sure everything is ok. This is what I had in mind. (In reply to Jonathan Druart from comment #3) > This is what I had in mind. Nice, I would prefer the + separator. And was waiting for bug 24356 and the work Agustin is doing for sorting and filtering on related tables. Created attachment 98198 [details] [review] Bug 24467: Remove _count methods introduced for API use This patch removes some methods that were introduced for API usage in the first iteration of the object embedding development effort. Those methods were obsoleted by bug 24528, which introduces a smarter way for Koha::Object->to_api to embed *_count attributes on the output structure based on the relationships and a call to ->count. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/Biblio.t => SUCCESS: Tests pass 3. Sign off :-D Created attachment 98202 [details] [review] Bug 24467: Remove _count methods introduced for API use This patch removes some methods that were introduced for API usage in the first iteration of the object embedding development effort. Those methods were obsoleted by bug 24528, which introduces a smarter way for Koha::Object->to_api to embed *_count attributes on the output structure based on the relationships and a call to ->count. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/Biblio.t => SUCCESS: Tests pass 3. Sign off :-D Signed-off-by: David Nind <david@davidnind.com> Created attachment 98218 [details] [review] Bug 24467: Remove _count methods introduced for API use This patch removes some methods that were introduced for API usage in the first iteration of the object embedding development effort. Those methods were obsoleted by bug 24528, which introduces a smarter way for Koha::Object->to_api to embed *_count attributes on the output structure based on the relationships and a call to ->count. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/Biblio.t => SUCCESS: Tests pass 3. Sign off :-D Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Created attachment 98219 [details] [review] Bug 24467: (QA follow-up) Fix POD in Koha::Biblio Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Created attachment 98220 [details] [review] Bug 24467: (QA follow-up) Clarify tests wording for ->count methods Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Nice work everyone! Pushed to master for 20.05 Enhancement not backported to 19.11.x |