Bug 24860: Implement reserves.item_group_id
authorKyle M Hall <kyle@bywatersolutions.com>
Fri, 28 Feb 2020 19:45:44 +0000 (14:45 -0500)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 4 Nov 2022 22:39:55 +0000 (19:39 -0300)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
C4/Reserves.pm
Koha/REST/V1/Holds.pm
api/v1/swagger/definitions/hold.yaml
api/v1/swagger/paths/holds.yaml

index c36eb66..2beed01 100644 (file)
@@ -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,
index 4418836..afd62ba 100644 (file)
@@ -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,
             }
         );
 
index 1ca8114..2c5ac09 100644 (file)
@@ -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
index 7ab45af..f63ce0c 100644 (file)
         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
               type:
                 - integer
                 - "null"
+            item_group_id:
+              description: Internal item group identifier
+              type:
+                - integer
+                - "null"
             hold_date:
               description: The date the hold was placed
               type: