]> git.koha-community.org Git - koha.git/commit
Bug 26143: Make the API handle per_page=-1
authorTomas Cohen Arazi <tomascohen@theke.io>
Wed, 5 Aug 2020 15:09:40 +0000 (12:09 -0300)
committerAleisha Amohia <aleishaamohia@hotmail.com>
Sun, 16 Aug 2020 21:49:32 +0000 (09:49 +1200)
commit11f75e753330999e98bfcaafb8369edc69352e97
tree44b524cbd16963c0da04d05ea5cefa9218b24c04
parent2b0bd07a2db8f4e5c255b6cace300a2d741eb08a
Bug 26143: Make the API handle per_page=-1

This patch introduces handling for per_page=-1 and actually adds a
missing feature to the API: being able to request all resources on a
route.

To test this:
1. Visit the libraries admin page
2. On the table, choose to display 'All' rows
=> FAIL: it doesn't refresh, the browser console displays a 500 error
code and so the logs
3. Apply the tests patches
4. Run:
   $ kshell
  k$ prove t/Koha/REST/Plugin/Pagination.t \
           t/db_dependent/Koha/REST/Plugin/Objects.t
=> FAIL: Tests fail loudly
5. Apply this patch
6. Restart plack
7. Repeat 2
=> SUCCESS: choosing to display all, works
8. Repeat 4
=> SUCCESS: Tests pass now!
9. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e4cae99f7ec76e40a57e4066e088b9b01caed744)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 72bcf69f425a92ce4adfb4919a412d7797a82df2)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Koha/REST/Plugin/Objects.pm
Koha/REST/Plugin/Pagination.pm