[Bug 13895] New: Add API routes for issues retrieval and renewal
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895 Bug ID: 13895 Summary: Add API routes for issues retrieval and renewal Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: new feature Priority: P5 - low Component: Web services Assignee: julian.maurice@biblibre.com Reporter: julian.maurice@biblibre.com QA Contact: testopia@bugs.koha-community.org Add API routes for issues retrieval and renewal -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |13799 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895 --- Comment #1 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 37146 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=37146&action=edit Bug 13895: Add API routes for issues retrieval and renewal GET /borrowers/{borrowernumber}/issues GET /borrowers/{borrowernumber}/issues/{itemnumber} PUT /borrowers/{borrowernumber}/issues/{itemnumber} + unit tests in t/db_dependent/api/v1/borrowers/issues.t Test plan: 1/ Go to http://api.yourlibrary/v1/doc and test the above routes with different values for each parameter 2/ Try to renew the same issue (with PUT) until the maximum number of renewals is reached (you should have a 403 error then) 3/ Run unit tests in t/db_dependent/api/v1/borrowers/issues.t Depends on bug 13799 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #37146|0 |1 is obsolete| | --- Comment #2 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 40104 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40104&action=edit Bug 13895: Add API routes for issues retrieval and renewal GET /borrowers/{borrowernumber}/issues GET /borrowers/{borrowernumber}/issues/{itemnumber} PUT /borrowers/{borrowernumber}/issues/{itemnumber} + unit tests in t/db_dependent/api/v1/borrowers/issues.t Test plan: 1/ Go to http://api.yourlibrary/v1/doc and test the above routes with different values for each parameter 2/ Try to renew the same issue (with PUT) until the maximum number of renewals is reached (you should have a 403 error then) 3/ Run unit tests in t/db_dependent/api/v1/borrowers/issues.t Depends on bugg 13799 FOLLOWUP 1: -------------- Rebased t/db_dependent/api/v1/borrowers/issues.t because C4::Circulation::AddIssue() was changed to return a DBIx-object, by Bugg 13315 which should have nothing to do modifying AddIssue()-function. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #40104|0 |1 is obsolete| | --- Comment #3 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 40143 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40143&action=edit Bug 13895: Add API routes for issues retrieval and renewal GET /borrowers/{borrowernumber}/issues GET /borrowers/{borrowernumber}/issues/{itemnumber} PUT /borrowers/{borrowernumber}/issues/{itemnumber} + unit tests in t/db_dependent/api/v1/borrowers/issues.t Test plan: 1/ Go to http://api.yourlibrary/v1/doc and test the above routes with different values for each parameter 2/ Try to renew the same issue (with PUT) until the maximum number of renewals is reached (you should have a 403 error then) 3/ Run unit tests in t/db_dependent/api/v1/borrowers/issues.t Depends on bugg 13799 FOLLOWUP 1: -------------- Rebased t/db_dependent/api/v1/borrowers/issues.t because C4::Circulation::AddIssue() was changed to return a DBIx-object, by Bugg 13315 which should have nothing to do modifying AddIssue()-function. Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Unit tests pass 100% Tested the new API calls using Swagger2 Triggered error cases: -Too many renewals. -Item not checked out or checked out to the wrong borrower. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |olli-antti.kivilahti@jns.fi Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895 --- Comment #4 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 40588 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40588&action=edit Bug 13895: 5. Add API routes for issues retrieval and renewal -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #40143|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #40588|0 |1 is obsolete| | --- Comment #5 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 41163 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41163&action=edit Bug 13895: 5. Add API routes for issues retrieval and renewal -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Status|Signed Off |BLOCKED --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Blocked by bug 13799. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #41163|0 |1 is obsolete| | --- Comment #7 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 41548 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41548&action=edit Bug 13895: 5. Add API routes for issues retrieval and renewal -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #41548|0 |1 is obsolete| | --- Comment #8 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 45817 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45817&action=edit Bug 13895: Add API routes for checkouts retrieval and renewal GET /checkouts?borrowernumber={borrowernumber} GET /checkouts/{checkout_id} PUT /checkouts/{checkout_id} + unit tests in t/db_dependent/api/v1/checkouts.t Test plan: 1. Open a browser tab on Koha staff and log in (to create CGISESSID cookie). You should have permission circulate_remaining_permissions. 2. Go to http://yourlibrary/api/v1/checkouts?borrowernumber=XXX (replace XXX with a borrowernumber that has checkouts) and check you receive correct data 3. Go to http://yourlibrary/api/v1/checkouts/YYY (replace YYY with an existing checkout id) and check you receive correct data 4. Send PUT requests to http://yourlibrary/api/v1/checkouts/YYY until the maximum number of renewals is reached (you should have a 403 error) 5. Run unit tests in t/db_dependent/api/v1/checkouts.t Depends on bug 15126 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|BLOCKED |Needs Signoff --- Comment #9 from Julian Maurice <julian.maurice@biblibre.com> --- Patch rebased on top of bug 15126 Signoff removed since this needed significant changes. Notable changes that were not required for the rebase: - "issue" reworded to "checkout" - Routes have changed (e.g. /checkouts?borrowernumber instead of /patrons/{borrowernumber}/checkouts) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Add API routes for issues |Add API routes for |retrieval and renewal |checkouts retrieval and | |renewal Depends on|13799 |15126 Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13799 [Bug 13799] Add base for building RESTful API http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15126 [Bug 15126] REST API: Use newer version of Swagger2 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org