From 9670e71b006b862578a23d47a3283f0005bc9f3d 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 Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- 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 c36eb669d6..2beed01768 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -192,6 +192,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 ||= dt_from_string; @@ -240,6 +241,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 44188363a6..afd62badca 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}; @@ -197,6 +198,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 1ca8114cf3..2c5ac09f8d 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 7ab45af5b7..f63ce0c017 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.39.5