20e0c056c6
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>
127 lines
2.8 KiB
YAML
127 lines
2.8 KiB
YAML
---
|
|
type: object
|
|
properties:
|
|
hold_id:
|
|
type: integer
|
|
description: Internal hold identifier
|
|
patron_id:
|
|
type: integer
|
|
description: Internal patron identifier
|
|
hold_date:
|
|
type:
|
|
- string
|
|
- "null"
|
|
format: date
|
|
description: The date the hold was placed
|
|
biblio_id:
|
|
type: integer
|
|
description: Internal biblio identifier
|
|
item_group_id:
|
|
type:
|
|
- string
|
|
- "null"
|
|
description: Internal item group identifier
|
|
pickup_library_id:
|
|
type:
|
|
- string
|
|
- "null"
|
|
description: Internal library identifier for the pickup library
|
|
desk_id:
|
|
type:
|
|
- integer
|
|
- "null"
|
|
description: The id of the desk
|
|
cancellation_date:
|
|
type:
|
|
- string
|
|
- "null"
|
|
format: date
|
|
description: The date the hold was cancelled
|
|
cancellation_reason:
|
|
type:
|
|
- string
|
|
- "null"
|
|
description: The reason the hold was cancelled
|
|
notes:
|
|
type:
|
|
- string
|
|
- "null"
|
|
description: Notes related to this hold
|
|
priority:
|
|
type:
|
|
- integer
|
|
- "null"
|
|
description: Where in the queue the patron sits
|
|
status:
|
|
type:
|
|
- string
|
|
- "null"
|
|
description: A one letter code defining what the status of the hold is after it has
|
|
been confirmed
|
|
timestamp:
|
|
type: string
|
|
format: date-time
|
|
description: Timestamp for the latest hold update
|
|
item_id:
|
|
type:
|
|
- integer
|
|
- "null"
|
|
description: Internal item identifier
|
|
waiting_date:
|
|
type:
|
|
- string
|
|
- "null"
|
|
format: date
|
|
description: The date the item was marked as waiting for the patron at the library
|
|
expiration_date:
|
|
type:
|
|
- string
|
|
- "null"
|
|
format: date
|
|
description: The date the hold expires
|
|
lowest_priority:
|
|
type: boolean
|
|
description: Controls if the hold is given the lowest priority on the queue
|
|
suspended:
|
|
type: boolean
|
|
description: Controls if the hold is suspended
|
|
suspended_until:
|
|
type:
|
|
- string
|
|
- "null"
|
|
format: date-time
|
|
description: Date until which the hold has been suspended
|
|
non_priority:
|
|
description: Set this hold as non priority
|
|
type: boolean
|
|
item_type:
|
|
type:
|
|
- string
|
|
- "null"
|
|
description: If record level hold, the optional itemtype of the item the patron is
|
|
requesting
|
|
item_level:
|
|
type: boolean
|
|
description: If the hold is placed at item level
|
|
cancellation_requested:
|
|
type:
|
|
- boolean
|
|
- "null"
|
|
description: Cancellation requests count for the hold (x-koha-embed)
|
|
biblio:
|
|
type:
|
|
- object
|
|
- "null"
|
|
description: Bibliographic record
|
|
item:
|
|
type:
|
|
- object
|
|
- "null"
|
|
description: The item
|
|
pickup_library:
|
|
type:
|
|
- object
|
|
- "null"
|
|
description: Pickup library
|
|
|
|
additionalProperties: false
|