From 24be638bd84a4a1852042b780fb05441baadd53d Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 11 Oct 2024 12:51:52 +0000 Subject: [PATCH] Bug 30648: Add new field to REST API Maybe we just undef it since ti will always be null except for old_hold obecjts and we don't have that route yet --- Koha/Hold.pm | 37 ++++++++++++++-------------- api/v1/swagger/definitions/hold.yaml | 3 +++ 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/Koha/Hold.pm b/Koha/Hold.pm index 1faec873ec2..27e2447eae1 100644 --- a/Koha/Hold.pm +++ b/Koha/Hold.pm @@ -1026,25 +1026,26 @@ on the API. sub to_api_mapping { return { - reserve_id => 'hold_id', - borrowernumber => 'patron_id', - reservedate => 'hold_date', - biblionumber => 'biblio_id', - branchcode => 'pickup_library_id', - notificationdate => undef, - reminderdate => undef, - cancellationdate => 'cancellation_date', - reservenotes => 'notes', - found => 'status', - itemnumber => 'item_id', - waitingdate => 'waiting_date', - expirationdate => 'expiration_date', + reserve_id => 'hold_id', + borrowernumber => 'patron_id', + reservedate => 'hold_date', + biblionumber => 'biblio_id', + deleted_biblionumber => 'deleted_biblio_id', + branchcode => 'pickup_library_id', + notificationdate => undef, + reminderdate => undef, + cancellationdate => 'cancellation_date', + reservenotes => 'notes', + found => 'status', + itemnumber => 'item_id', + waitingdate => 'waiting_date', + expirationdate => 'expiration_date', patron_expiration_date => undef, - lowestPriority => 'lowest_priority', - suspend => 'suspended', - suspend_until => 'suspended_until', - itemtype => 'item_type', - item_level_hold => 'item_level', + lowestPriority => 'lowest_priority', + suspend => 'suspended', + suspend_until => 'suspended_until', + itemtype => 'item_type', + item_level_hold => 'item_level', }; } diff --git a/api/v1/swagger/definitions/hold.yaml b/api/v1/swagger/definitions/hold.yaml index 85bcd669000..98d4309cca8 100644 --- a/api/v1/swagger/definitions/hold.yaml +++ b/api/v1/swagger/definitions/hold.yaml @@ -16,6 +16,9 @@ properties: biblio_id: type: integer description: Internal biblio identifier + deleted_biblio_id: + type: integer + description: Internal deleted biblio identifier item_group_id: type: - string -- 2.39.5