Koha-clms/api/v1/swagger
Lisette Scheer 27fe80a88f
Bug 41889: Update API to allow for null patron_id to be returned when listing checkouts
If a patron is deleted and there's a checkout associated with them, an api call to {url}/api/v1/checkouts?checked_in=true
will result in an error. This patch updates the api to allow for a null value to be returned for patron_id

To test:
Before applying the patch:

1. In Administration->System preference enable the RESTBasicAuth system preference.
2. Checkout an item to a patron (I used item barcode: 39999000000252 and patron barcode 23529000121682)
3. Check the item back in
4. In your brower go to {sandbox/ktdurl}/api/v1/checkouts?checked_in=1
5. Observe there is a patron ID in the JSON response
6. Delete the patron
7. Repeat step 4
8. Observe an error because a "null" value was returned
9. Apply patch
   Sandbox:
       In sandbox management Actions->Apply patches
       Once complete Actions->Build CSS and JS
       Actions->Restart services
   KTD:
       ktd --shell
       git bz apply 41889
       yarn build
       restart_all

10. Repeat step 4
11. Observe the checkout loads, but now has a null patron id.
12. Sign off
On KTD can also run the script: qa
to run tests.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 64bea0833a)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
2026-09-11 12:28:24 +00:00
..
definitions Bug 41889: Update API to allow for null patron_id to be returned when listing checkouts 2026-09-11 12:28:24 +00:00
parameters Bug 29002: Add bookings objects and API classes 2023-11-03 12:04:07 -03:00
paths Bug 29016 [25.11.x]: (QA follow-up) Expand action_logs API and test coverage 2026-05-24 13:42:26 +01:00
swagger.yaml Bug 29016 [25.11.x]: (RM follow-up) Add action_logs tag to swagger def 2026-05-24 13:42:44 +01:00