]> git.koha-community.org Git - koha.git/commit
Bug 37021: Change item_id type as integer in holds endpoint
authorEmmi Takkinen <emmi.takkinen@koha-suomi.fi>
Tue, 4 Jun 2024 10:00:05 +0000 (13:00 +0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Wed, 17 Jul 2024 14:04:21 +0000 (16:04 +0200)
commitbcc9cfeefb95a0b0ebab6c0cbe536948e56aead0
tree2da4d979e2af48d903c42616aab1270be1c89b2d
parent5a78c23ce9b45c40942e01e052492555b83e5dae
Bug 37021: Change item_id type as integer in holds endpoint

When one makes a GET call to holds endpoint and hold has
item attached to it, item_id is handled as string not integer
as it should.

To reproduce:
1. Make sure you have hold waiting in your database.
2. Call endpoint api/v1/holds/?q=[{"me.status":"W"}].
=> Note that holds item_id is displayed as item_id: "12345".
3. Apply this patch.
4. Call endpoint again.
=> item_id should now be displayed as 12345.

Also prove t/db_dependent/api/v1/holds.t.

Signed-off-by: Jan Kissig <jkissig@th-wildau.de>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 20e0c056c6faed4252e1718f97f36d15027e93fc)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 310d19e6b3b34ebfb5826e202f5678dbd5e34890)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
api/v1/swagger/definitions/hold.yaml