From ab66beac7672036d42e7707f4f718bdc7b7cb3ee Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 28 Feb 2020 14:45:44 -0500 Subject: [PATCH] Bug 24860: Implement reserves.item_group_id Signed-off-by: Andrew Fuerste-Henry Signed-off-by: Rebecca Coert --- C4/Reserves.pm | 2 ++ Koha/REST/V1/Holds.pm | 2 ++ api/v1/swagger/definitions/hold.yaml | 5 +++++ api/v1/swagger/paths/holds.yaml | 9 +++++++++ 4 files changed, 18 insertions(+) diff --git a/C4/Reserves.pm b/C4/Reserves.pm index 9a1a7fc7585..332aa1d8b15 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -193,6 +193,7 @@ sub AddReserve { my $found = $params->{found}; my $itemtype = $params->{itemtype}; my $non_priority = $params->{non_priority}; + my $item_group_id = $params->{item_group_id}; $resdate = output_pref( { str => dt_from_string( $resdate ), dateonly => 1, dateformat => 'iso' }) or output_pref({ dt => dt_from_string, dateonly => 1, dateformat => 'iso' }); @@ -244,6 +245,7 @@ sub AddReserve { { borrowernumber => $borrowernumber, biblionumber => $biblionumber, + item_group_id => $item_group_id, reservedate => $resdate, branchcode => $branch, priority => $priority, diff --git a/Koha/REST/V1/Holds.pm b/Koha/REST/V1/Holds.pm index acd4b78e20e..301e51cf46e 100644 --- a/Koha/REST/V1/Holds.pm +++ b/Koha/REST/V1/Holds.pm @@ -70,6 +70,7 @@ sub add { my $item; my $biblio_id = $body->{biblio_id}; + my $item_group_id = $body->{item_group_id}; my $pickup_library_id = $body->{pickup_library_id}; my $item_id = $body->{item_id}; my $patron_id = $body->{patron_id}; @@ -202,6 +203,7 @@ sub add { found => undef, # TODO: Why not? itemtype => $item_type, non_priority => $non_priority, + item_group_id => $item_group_id, } ); diff --git a/api/v1/swagger/definitions/hold.yaml b/api/v1/swagger/definitions/hold.yaml index 1ca8114cf32..2c5ac09f8dc 100644 --- a/api/v1/swagger/definitions/hold.yaml +++ b/api/v1/swagger/definitions/hold.yaml @@ -16,6 +16,11 @@ properties: biblio_id: type: integer description: Internal biblio identifier + item_group_id: + type: + - string + - "null" + description: Internal item_group identifier pickup_library_id: type: - string diff --git a/api/v1/swagger/paths/holds.yaml b/api/v1/swagger/paths/holds.yaml index 617eb3d9d39..8c7beea180a 100644 --- a/api/v1/swagger/paths/holds.yaml +++ b/api/v1/swagger/paths/holds.yaml @@ -24,6 +24,10 @@ in: query description: Internal biblio identifier type: integer + - name: item_group_id + in: query + description: Internal item group identifier + type: integer - name: pickup_library_id in: query description: Internal library identifier for the pickup library @@ -140,6 +144,11 @@ type: - integer - "null" + item_group_id: + description: Internal item group identifier + type: + - integer + - "null" hold_date: description: The date the hold was placed type: -- 2.30.2