Description
Tomás Cohen Arazi (tcohen)
2018-01-17 17:50:22 UTC
Created attachment 84374 [details] [review] Bug 20006: Spec changes This patch makes the spec match the voted RFC. Created attachment 84375 [details] [review] Bug 20006: Unit tests fixes This patch makes the holds endpoint tests pass and expect data structures that match the voted RFC. As we voted to introduce a /public namespace for unprivileged access to endpoints, this endpoint gets the ability for owners and guarantors to manipulate holds through the API. Created attachment 84376 [details] [review] But 20006: Adapt /holds to the RFC This patch makes the /holds endpoint respect the voted RFC. Some behaviours are changed as well: - As we voted to introduce a /public namespace for unprivileged access to endpoints, this endpoint gets the ability for owners and guarantors to manipulate holds through the API. - GET /holds now uses the objects->search helper, so it now has pagination. To test: - Apply this patches - Run: $ kshell k$ prove t/db_dependent/api/v1/holds.t => SUCCESS: Tests pass! - Sign off :-D TODO: Still need to adjust the holds page to use the new aPI spec. Created attachment 84381 [details] [review] Bug 20006: Adapt /holds to the RFC This patch makes the /holds endpoint respect the voted RFC. Some behaviours are changed as well: - As we voted to introduce a /public namespace for unprivileged access to endpoints, this endpoint gets the ability for owners and guarantors to manipulate holds through the API. - GET /holds now uses the objects->search helper, so it now has pagination. To test: - Apply this patches - Run: $ kshell k$ prove t/db_dependent/api/v1/holds.t => SUCCESS: Tests pass! - Sign off :-D Created attachment 84382 [details] [review] Bug 20006: (follow-up) Fix holds.js This patch makes holds.js call the endpoint with 'pickup_library_id' instead of the old 'branchcode' property. To test: - Place a hold - Go to the patron's detail page - Go to the Holds tab - Change the pickup location => SUCCESS: It works! Created attachment 84386 [details] [review] Bug 20006: (follow-up) Plural class name Created attachment 84395 [details] [review] Bug 20006: Spec changes This patch makes the spec match the voted RFC. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Created attachment 84396 [details] [review] Bug 20006: Unit tests fixes This patch makes the holds endpoint tests pass and expect data structures that match the voted RFC. As we voted to introduce a /public namespace for unprivileged access to endpoints, this endpoint gets the ability for owners and guarantors to manipulate holds through the API. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Created attachment 84397 [details] [review] Bug 20006: Adapt /holds to the RFC This patch makes the /holds endpoint respect the voted RFC. Some behaviours are changed as well: - As we voted to introduce a /public namespace for unprivileged access to endpoints, this endpoint gets the ability for owners and guarantors to manipulate holds through the API. - GET /holds now uses the objects->search helper, so it now has pagination. To test: - Apply this patches - Run: $ kshell k$ prove t/db_dependent/api/v1/holds.t => SUCCESS: Tests pass! - Sign off :-D Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Created attachment 84398 [details] [review] Bug 20006: (follow-up) Fix holds.js This patch makes holds.js call the endpoint with 'pickup_library_id' instead of the old 'branchcode' property. To test: - Place a hold - Go to the patron's detail page - Go to the Holds tab - Change the pickup location => SUCCESS: It works! Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Created attachment 84399 [details] [review] Bug 20006: (follow-up) Plural class name Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Created attachment 85051 [details] [review] Bug 20006: Spec changes This patch makes the spec match the voted RFC. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 85052 [details] [review] Bug 20006: Unit tests fixes This patch makes the holds endpoint tests pass and expect data structures that match the voted RFC. As we voted to introduce a /public namespace for unprivileged access to endpoints, this endpoint gets the ability for owners and guarantors to manipulate holds through the API. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 85053 [details] [review] Bug 20006: Adapt /holds to the RFC This patch makes the /holds endpoint respect the voted RFC. Some behaviours are changed as well: - As we voted to introduce a /public namespace for unprivileged access to endpoints, this endpoint gets the ability for owners and guarantors to manipulate holds through the API. - GET /holds now uses the objects->search helper, so it now has pagination. To test: - Apply this patches - Run: $ kshell k$ prove t/db_dependent/api/v1/holds.t => SUCCESS: Tests pass! - Sign off :-D Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 85054 [details] [review] Bug 20006: (follow-up) Fix holds.js This patch makes holds.js call the endpoint with 'pickup_library_id' instead of the old 'branchcode' property. To test: - Place a hold - Go to the patron's detail page - Go to the Holds tab - Change the pickup location => SUCCESS: It works! Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 85055 [details] [review] Bug 20006: (follow-up) Plural class name Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> I've given this a pretty thorough testing and we're passing the QA scripts.. passing QA. Side Note: We need some clear release notes for this one as it's a breaking change in the api functionality and we've not incremented the api version for it. Tomas and I discussed this and we're confident it's good to push for 19.05 without an api version bump. We believe the v1 api isn't in common use yet as it's still 'stabalising' and as such this is good to go. Created attachment 85856 [details] [review] Bug 20006: Spec changes This patch makes the spec match the voted RFC. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 85857 [details] [review] Bug 20006: Unit tests fixes This patch makes the holds endpoint tests pass and expect data structures that match the voted RFC. As we voted to introduce a /public namespace for unprivileged access to endpoints, this endpoint gets the ability for owners and guarantors to manipulate holds through the API. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 85858 [details] [review] Bug 20006: Adapt /holds to the RFC This patch makes the /holds endpoint respect the voted RFC. Some behaviours are changed as well: - As we voted to introduce a /public namespace for unprivileged access to endpoints, this endpoint gets the ability for owners and guarantors to manipulate holds through the API. - GET /holds now uses the objects->search helper, so it now has pagination. To test: - Apply this patches - Run: $ kshell k$ prove t/db_dependent/api/v1/holds.t => SUCCESS: Tests pass! - Sign off :-D Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 85859 [details] [review] Bug 20006: (follow-up) Fix holds.js This patch makes holds.js call the endpoint with 'pickup_library_id' instead of the old 'branchcode' property. To test: - Place a hold - Go to the patron's detail page - Go to the Holds tab - Change the pickup location => SUCCESS: It works! Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 85860 [details] [review] Bug 20006: (follow-up) Plural class name Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> I've just rebased it to current master (conflict in parameters.json after /libraries got pushed). Awesome work all! Pushed to master for 19.05 Enhancement with breaking changes.. will not be backported to 18.11.x series. I decided to backport this in the end. As per my policy of backporting new/enhanced API endpoints where it's simple to do so. I believe, although this is a breaking change, it's better to get this change in early and people less people to adapt to it now rather than leave it to be adapted later once more people are using the API's. Pushed to 18.11.x for 18.11.04 enhancment not backporting to 18.05.x |