Bug 26636 - Add objects.find Mojolicious helper
Summary: Add objects.find Mojolicious helper
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: REST API (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Agustín Moyano
QA Contact:
URL:
Keywords:
Depends on:
Blocks: 17314 26635 27855
  Show dependency treegraph
 
Reported: 2020-10-08 17:43 UTC by Agustín Moyano
Modified: 2022-06-06 20:24 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.05.00
Circulation function:


Attachments
Bug 26636: Add tests (5.31 KB, patch)
2020-10-09 17:24 UTC, Agustín Moyano
Details | Diff | Splinter Review
Bug 26636: Add objects.find helper (1.21 KB, patch)
2020-10-09 17:24 UTC, Agustín Moyano
Details | Diff | Splinter Review
Bug 26636: Add tests (3.34 KB, patch)
2021-02-02 19:52 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 26636: Add objects.find helper (1.40 KB, patch)
2021-02-02 19:52 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 26636: (QA follow-up) Add POD (1.91 KB, patch)
2021-02-02 19:52 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 26636: Regression tests for undef case (1.30 KB, patch)
2021-02-02 19:52 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 26636: (QA follow-up) Handle no results correctly (848 bytes, patch)
2021-02-02 19:53 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 26636: Add tests (3.41 KB, patch)
2021-02-02 19:55 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 26636: Add objects.find helper (1.44 KB, patch)
2021-02-02 19:55 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 26636: (QA follow-up) Add POD (1.97 KB, patch)
2021-02-02 19:55 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 26636: Regression tests for undef case (1.36 KB, patch)
2021-02-02 19:55 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 26636: (QA follow-up) Handle no results correctly (913 bytes, patch)
2021-02-02 19:55 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 26636: Add tests (3.43 KB, patch)
2021-02-09 15:35 UTC, Agustín Moyano
Details | Diff | Splinter Review
Bug 26636: Add objects.find helper (1.49 KB, patch)
2021-02-09 15:35 UTC, Agustín Moyano
Details | Diff | Splinter Review
Bug 26636: (QA follow-up) Add POD (2.00 KB, patch)
2021-02-09 15:35 UTC, Agustín Moyano
Details | Diff | Splinter Review
Bug 26636: Regression tests for undef case (1.39 KB, patch)
2021-02-09 15:35 UTC, Agustín Moyano
Details | Diff | Splinter Review
Bug 26636: (QA follow-up) Handle no results correctly (941 bytes, patch)
2021-02-09 15:35 UTC, Agustín Moyano
Details | Diff | Splinter Review
Bug 26636: Add tests (3.49 KB, patch)
2021-03-04 10:34 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26636: Add objects.find helper (1.55 KB, patch)
2021-03-04 10:34 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26636: (QA follow-up) Add POD (2.06 KB, patch)
2021-03-04 10:34 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26636: Regression tests for undef case (1.45 KB, patch)
2021-03-04 10:34 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26636: (QA follow-up) Handle no results correctly (1005 bytes, patch)
2021-03-04 10:34 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26636: Add tests [20.11.x] (3.53 KB, patch)
2021-11-11 11:34 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 26636: Add objects.find helper [20.11.x] (1.56 KB, patch)
2021-11-11 11:34 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 26636: (QA follow-up) Add POD [20.11.x] (2.07 KB, patch)
2021-11-11 11:34 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 26636: Regression tests for undef case [20.11.x] (1.46 KB, patch)
2021-11-11 11:34 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 26636: (QA follow-up) Handle no results correctly [20.11.x] (1016 bytes, patch)
2021-11-11 11:34 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Agustín Moyano 2020-10-08 17:43:09 UTC
We need a new objects.find mojolicious helper, just as objects.search, that enables embedding child objects and authorisation values expansion
Comment 1 Agustín Moyano 2020-10-09 17:24:18 UTC
Created attachment 111418 [details] [review]
Bug 26636: Add tests

Add tests in t/db_dependent/Koha/REST/Plugin/Objects.t
Comment 2 Agustín Moyano 2020-10-09 17:24:23 UTC
Created attachment 111419 [details] [review]
Bug 26636: Add objects.find helper

This patch adds the objects.find helper. Much like objects.search, it
returns the to_api method with embedded children and expanded authorised
values.

This patch will be implemented in bug 8179, so please test there
Comment 3 Andrew Fuerste-Henry 2021-02-02 15:33:54 UTC
Please rebase for testing bug 8179
Comment 4 Tomás Cohen Arazi (tcohen) 2021-02-02 19:52:35 UTC
Created attachment 116222 [details] [review]
Bug 26636: Add tests

This patch adds tests for the new objects.find helper.

Sponsored-by: Virginia Tech Libraries
Comment 5 Tomás Cohen Arazi (tcohen) 2021-02-02 19:52:41 UTC
Created attachment 116223 [details] [review]
Bug 26636: Add objects.find helper

This patch adds the objects.find helper. Much like objects.search, it
returns the to_api method with embedded.

Sponsored-by: Virginia Tech Libraries
Comment 6 Tomás Cohen Arazi (tcohen) 2021-02-02 19:52:47 UTC
Created attachment 116224 [details] [review]
Bug 26636: (QA follow-up) Add POD

Sponsored-by: Virginia Tech Libraries

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 7 Tomás Cohen Arazi (tcohen) 2021-02-02 19:52:53 UTC
Created attachment 116225 [details] [review]
Bug 26636: Regression tests for undef case

This patch adds tests for the case in which there's no object identified
by the supplied $id. It should return undef.

Sponsored-by: Virginia Tech Libraries

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 8 Tomás Cohen Arazi (tcohen) 2021-02-02 19:53:01 UTC
Created attachment 116226 [details] [review]
Bug 26636: (QA follow-up) Handle no results correctly

Sponsored-by: Virginia Tech Libraries

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 9 Tomás Cohen Arazi (tcohen) 2021-02-02 19:54:56 UTC
With Agustin's permission, I decided to remove the authorised values bit from this bug, and move it to 26635. I added some QA follow-ups in the process.

Dependencies changed as well.
Comment 10 Andrew Fuerste-Henry 2021-02-02 19:55:19 UTC
Created attachment 116227 [details] [review]
Bug 26636: Add tests

This patch adds tests for the new objects.find helper.

Sponsored-by: Virginia Tech Libraries

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 11 Andrew Fuerste-Henry 2021-02-02 19:55:22 UTC
Created attachment 116228 [details] [review]
Bug 26636: Add objects.find helper

This patch adds the objects.find helper. Much like objects.search, it
returns the to_api method with embedded.

Sponsored-by: Virginia Tech Libraries

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 12 Andrew Fuerste-Henry 2021-02-02 19:55:25 UTC
Created attachment 116229 [details] [review]
Bug 26636: (QA follow-up) Add POD

Sponsored-by: Virginia Tech Libraries

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 13 Andrew Fuerste-Henry 2021-02-02 19:55:27 UTC
Created attachment 116230 [details] [review]
Bug 26636: Regression tests for undef case

This patch adds tests for the case in which there's no object identified
by the supplied $id. It should return undef.

Sponsored-by: Virginia Tech Libraries

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 14 Andrew Fuerste-Henry 2021-02-02 19:55:30 UTC
Created attachment 116231 [details] [review]
Bug 26636: (QA follow-up) Handle no results correctly

Sponsored-by: Virginia Tech Libraries

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 15 Agustín Moyano 2021-02-09 15:35:13 UTC
Created attachment 116594 [details] [review]
Bug 26636: Add tests

This patch adds tests for the new objects.find helper.

Sponsored-by: Virginia Polytechnic Institute and State University

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 16 Agustín Moyano 2021-02-09 15:35:16 UTC
Created attachment 116595 [details] [review]
Bug 26636: Add objects.find helper

This patch adds the objects.find helper. Much like objects.search, it
returns the to_api method with embedded.

Sponsored-by: Virginia Polytechnic Institute and State University

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 17 Agustín Moyano 2021-02-09 15:35:19 UTC
Created attachment 116596 [details] [review]
Bug 26636: (QA follow-up) Add POD

Sponsored-by: Virginia Polytechnic Institute and State University

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 18 Agustín Moyano 2021-02-09 15:35:23 UTC
Created attachment 116597 [details] [review]
Bug 26636: Regression tests for undef case

This patch adds tests for the case in which there's no object identified
by the supplied $id. It should return undef.

Sponsored-by: Virginia Polytechnic Institute and State University

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 19 Agustín Moyano 2021-02-09 15:35:27 UTC
Created attachment 116598 [details] [review]
Bug 26636: (QA follow-up) Handle no results correctly

Sponsored-by: Virginia Polytechnic Institute and State University

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 20 Martin Renvoize (ashimema) 2021-03-04 10:34:10 UTC
Created attachment 117669 [details] [review]
Bug 26636: Add tests

This patch adds tests for the new objects.find helper.

Sponsored-by: Virginia Polytechnic Institute and State University

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 21 Martin Renvoize (ashimema) 2021-03-04 10:34:13 UTC
Created attachment 117670 [details] [review]
Bug 26636: Add objects.find helper

This patch adds the objects.find helper. Much like objects.search, it
returns the to_api method with embedded.

Sponsored-by: Virginia Polytechnic Institute and State University

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 22 Martin Renvoize (ashimema) 2021-03-04 10:34:16 UTC
Created attachment 117671 [details] [review]
Bug 26636: (QA follow-up) Add POD

Sponsored-by: Virginia Polytechnic Institute and State University

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 23 Martin Renvoize (ashimema) 2021-03-04 10:34:20 UTC
Created attachment 117672 [details] [review]
Bug 26636: Regression tests for undef case

This patch adds tests for the case in which there's no object identified
by the supplied $id. It should return undef.

Sponsored-by: Virginia Polytechnic Institute and State University

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 24 Martin Renvoize (ashimema) 2021-03-04 10:34:23 UTC
Created attachment 117673 [details] [review]
Bug 26636: (QA follow-up) Handle no results correctly

Sponsored-by: Virginia Polytechnic Institute and State University

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 25 Martin Renvoize (ashimema) 2021-03-04 10:35:57 UTC
A clear and concise patchset that include regressions tests, works as expected and passes QA script.

Passing QA
Comment 26 Jonathan Druart 2021-03-09 10:02:39 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 27 Fridolin Somers 2021-03-12 08:49:56 UTC
Enhancement not pushed to 20.11.x
Comment 28 Tomás Cohen Arazi (tcohen) 2021-11-11 11:34:14 UTC
Created attachment 127528 [details] [review]
Bug 26636: Add tests [20.11.x]

This patch adds tests for the new objects.find helper.

Sponsored-by: Virginia Polytechnic Institute and State University

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 29 Tomás Cohen Arazi (tcohen) 2021-11-11 11:34:29 UTC
Created attachment 127529 [details] [review]
Bug 26636: Add objects.find helper [20.11.x]

This patch adds the objects.find helper. Much like objects.search, it
returns the to_api method with embedded.

Sponsored-by: Virginia Polytechnic Institute and State University

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 30 Tomás Cohen Arazi (tcohen) 2021-11-11 11:34:36 UTC
Created attachment 127530 [details] [review]
Bug 26636: (QA follow-up) Add POD [20.11.x]

Sponsored-by: Virginia Polytechnic Institute and State University

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 31 Tomás Cohen Arazi (tcohen) 2021-11-11 11:34:42 UTC
Created attachment 127531 [details] [review]
Bug 26636: Regression tests for undef case [20.11.x]

This patch adds tests for the case in which there's no object identified
by the supplied $id. It should return undef.

Sponsored-by: Virginia Polytechnic Institute and State University

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 32 Tomás Cohen Arazi (tcohen) 2021-11-11 11:34:48 UTC
Created attachment 127532 [details] [review]
Bug 26636: (QA follow-up) Handle no results correctly [20.11.x]

Sponsored-by: Virginia Polytechnic Institute and State University

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>