Because of the 'checked_in' parameter, the list() method got too complex. It should be just using $c->objects->search instead, after cleaning that param from the validated parameters list.
Created attachment 115770 [details] [review] Bug 27544: Simplilfy GET /checkouts implementation This patch makes the list() controller method simpler, by removing the checked_in parameter, and passing the appropriate restulset. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/checkouts.t => SUCCESS: Tests pass! 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! (no behaviour change) 4. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 115772 [details] [review] Bug 27544: Simplilfy GET /checkouts implementation This patch makes the list() controller method simpler, by removing the checked_in parameter, and passing the appropriate restulset. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/checkouts.t => SUCCESS: Tests pass! 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! (no behaviour change) 4. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 115773 [details] [review] Bug 27544: Simplify GET /checkouts implementation This patch makes the list() controller method simpler, by removing the checked_in parameter, and passing the appropriate restulset. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/checkouts.t => SUCCESS: Tests pass! 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! (no behaviour change) 4. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 115778 [details] [review] Bug 27544: Simplify GET /checkouts implementation This patch makes the list() controller method simpler, by removing the checked_in parameter, and passing the appropriate restulset. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/checkouts.t => SUCCESS: Tests pass! 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! (no behaviour change) 4. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nice cleanup, works as expected.. Passing QA
Pushed to master for 21.05, thanks to everybody involved!