From a7ead95c146106781a5e62807bb713fb7ba59b26 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Maybe we just undef it since ti will always be null except for old_hold obecjts and we don't have that route yet Signed-off-by: Anneli Österman Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- 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 ac3768f0e2..f5f8ada2b4 100644 --- a/Koha/Hold.pm +++ b/Koha/Hold.pm @@ -1027,25 +1027,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 85bcd66900..98d4309cca 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