[koha-commits] main Koha release repository branch 20.05.x updated. v20.05.02-147-g72bcf69f42
Git repo owner
gitmaster at git.koha-community.org
Thu Aug 13 20:46:26 CEST 2020
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, 20.05.x has been updated
via 72bcf69f425a92ce4adfb4919a412d7797a82df2 (commit)
via 9a4910812f03fade73d27db8ce975dc0a15fe9e7 (commit)
via dd3c09e8486eb79f709dd5ea484f1c09c1805289 (commit)
from 3f3a7641f59a3c11cfbdc316f5c8b5b646c8d25d (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 72bcf69f425a92ce4adfb4919a412d7797a82df2
Author: Tomas Cohen Arazi <tomascohen at theke.io>
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 <tomascohen at theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
(cherry picked from commit e4cae99f7ec76e40a57e4066e088b9b01caed744)
Signed-off-by: Lucas Gass <lucas at bywatersolutions.com>
commit 9a4910812f03fade73d27db8ce975dc0a15fe9e7
Author: Tomas Cohen Arazi <tomascohen at theke.io>
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 <tomascohen at theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
(cherry picked from commit d20bc39d759bc9321b1b7accb952f90351a14caa)
Signed-off-by: Lucas Gass <lucas at bywatersolutions.com>
commit dd3c09e8486eb79f709dd5ea484f1c09c1805289
Author: Tomas Cohen Arazi <tomascohen at theke.io>
Date: Wed Aug 5 11:55:28 2020 -0300
Bug 26143: The API is always paginated
Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
(cherry picked from commit 61e8dc8c7d489329c27aca3b6b10137c289161cb)
Signed-off-by: Lucas Gass <lucas at bywatersolutions.com>
-----------------------------------------------------------------------
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
More information about the koha-commits
mailing list