https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43602
Bug ID: 43602
Summary: Add REST API endpoints for article request status
transitions
Initiative type: ---
Sponsorship ---
status:
Product: Koha
Version: Main
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: REST API
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
CC: [email protected]
Target Milestone: ---
Currently the REST API only exposes cancellation for article requests:
- DELETE /api/v1/article_requests/{article_request_id}
(Koha::REST::V1::ArticleRequests#cancel)
- DELETE /api/public/patrons/{patron_id}/article_requests/{article_request_id}
(#patron_cancel)
Every other step of the article request lifecycle is missing from the REST API
and instead goes through the legacy cookie-authenticated CGI script
svc/article_request
(op=cud-process|cud-pending|cud-complete|cud-update_urls|cud-update_library_id),
called from
koha-tmpl/intranet-tmpl/prog/js/fetch/article-request-api-client.js:
- Set request as pending (Koha::ArticleRequest->set_pending, status -> PENDING)
- Process request (Koha::ArticleRequest->process, status -> PROCESSING)
- Complete request (Koha::ArticleRequest->complete, status -> COMPLETED)
- Update delivery URL(s) for SCAN format requests (the urls column)
- Update pickup library (the branchcode column)
There is also no REST endpoint to create an article request
(Koha::ArticleRequest->request), used by opac/opac-request-article.pl and
circ/request-article.pl.
This means there is no documented/stable way to drive the article request
fulfilment workflow (the staff queue at circ/article-requests.pl)
programmatically via API key/OAuth2 - only cancellation is covered by the
documented API.
Suggested scope:
1. POST /api/v1/article_requests (and/or a nested
/api/v1/biblios/{biblio_id}/article_requests) to create a request
2. PATCH /api/v1/article_requests/{article_request_id} to support status
transitions (pending/processing/completed) and updates to urls/branchcode,
reusing the same authorization (circulate: circulate_remaining_permissions) as
the existing cancel route
3. An equivalent public route under
/api/public/patrons/{patron_id}/article_requests for OPAC self-service
creation, mirroring the existing patron_cancel route
Filling this gap would let svc/article_request be retired in favour of the REST
API, and let
koha-tmpl/intranet-tmpl/prog/js/fetch/article-request-api-client.js move off
the legacy endpoint, consistent with Koha's move away from ad hoc svc/ scripts.
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/