[Koha-bugs] [Bug 13895] Add API routes for issues retrieval and renewal

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Jun 15 16:37:06 CEST 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

Olli-Antti Kivilahti <olli-antti.kivilahti at jns.fi> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #40104|0                           |1
        is obsolete|                            |

--- Comment #3 from Olli-Antti Kivilahti <olli-antti.kivilahti at 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 at 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.


More information about the Koha-bugs mailing list