This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "main Koha release repository".
The branch, 19.11.x has been updated
via 11f75e753330999e98bfcaafb8369edc69352e97 (commit)
via 2b0bd07a2db8f4e5c255b6cace300a2d741eb08a (commit)
via d6398f2f083ce9dfaebcd4e6298f5c611eb3d009 (commit)
from c106d5a29d32572276489b5b1f3b8941ab17c778 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 11f75e753330999e98bfcaafb8369edc69352e97
Author: Tomas Cohen Arazi <[email protected]>
Date: Wed Aug 5 12:09:40 2020 -0300
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 <[email protected]>
Signed-off-by: Jonathan Druart <[email protected]>
(cherry picked from commit e4cae99f7ec76e40a57e4066e088b9b01caed744)
Signed-off-by: Lucas Gass <[email protected]>
(cherry picked from commit 72bcf69f425a92ce4adfb4919a412d7797a82df2)
Signed-off-by: Aleisha Amohia <[email protected]>
commit 2b0bd07a2db8f4e5c255b6cace300a2d741eb08a
Author: Tomas Cohen Arazi <[email protected]>
Date: Wed Aug 5 12:04:47 2020 -0300
Bug 26143: Regression tests
This patch introduces tests for the per_page=-1 handling use case. From
now on per_page=-1 means 'all resources'.
On writing this I noticed that we always paginate results no matter
what, but there was a weird condition under which on pagination headers
were sent back to the API consumer. This is highlighted in the precedent
patch, which is not the -1 situation this one tries to tackle.
Both pagination and searching are broken with per_page=-1, which is a
standard, and we actually didn't explicitly set a way to request all
resources.
To verify this:
1. Apply the previous tests patch and this one
2. Run:
$ kshell
k$ prove t/Koha/REST/Plugin/Pagination.t \
t/db_dependent/Koha/REST/Plugin/Objects.t
=> FAIL: Things are damn broken
Signed-off-by: Tomas Cohen Arazi <[email protected]>
Signed-off-by: Jonathan Druart <[email protected]>
(cherry picked from commit d20bc39d759bc9321b1b7accb952f90351a14caa)
Signed-off-by: Lucas Gass <[email protected]>
(cherry picked from commit 9a4910812f03fade73d27db8ce975dc0a15fe9e7)
Signed-off-by: Aleisha Amohia <[email protected]>
commit d6398f2f083ce9dfaebcd4e6298f5c611eb3d009
Author: Tomas Cohen Arazi <[email protected]>
Date: Wed Aug 5 11:55:28 2020 -0300
Bug 26143: The API is always paginated
Signed-off-by: Tomas Cohen Arazi <[email protected]>
Signed-off-by: Jonathan Druart <[email protected]>
(cherry picked from commit 61e8dc8c7d489329c27aca3b6b10137c289161cb)
Signed-off-by: Lucas Gass <[email protected]>
(cherry picked from commit dd3c09e8486eb79f709dd5ea484f1c09c1805289)
Signed-off-by: Aleisha Amohia <[email protected]>
-----------------------------------------------------------------------
Summary of changes:
Koha/REST/Plugin/Objects.pm | 22 ++++++----
Koha/REST/Plugin/Pagination.pm | 22 +++++-----
t/Koha/REST/Plugin/Pagination.t | 67 +++++++++++++++++++++++++++++--
t/db_dependent/Koha/REST/Plugin/Objects.t | 14 ++++++-
4 files changed, 104 insertions(+), 21 deletions(-)
hooks/post-receive
--
main Koha release repository
_______________________________________________
koha-commits mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-commits