Bug 9834: (QA follow-up) API Corrections
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 17 Jun 2019 15:16:53 +0000 (12:16 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 20 Jun 2019 16:12:12 +0000 (17:12 +0100)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Koha/REST/V1/Holds.pm
Koha/Schema/Result/Reserve.pm
api/v1/swagger/definitions/hold.json

index 58ddf1f..a74307f 100644 (file)
@@ -464,6 +464,7 @@ our $to_api_mapping = {
     suspend          => 'suspended',
     suspend_until    => 'suspended_until',
     itemtype         => 'item_type',
+    item_level_hold  => 'item_level',
 };
 
 =head3 $to_model_mapping
@@ -486,6 +487,7 @@ our $to_model_mapping = {
     suspended         => 'suspend',
     suspended_until   => 'suspend_until',
     item_type         => 'itemtype',
+    item_level        => 'item_level_hold',
 };
 
 1;
index 8b91618..213df08 100644 (file)
@@ -349,8 +349,9 @@ __PACKAGE__->belongs_to(
 );
 
 __PACKAGE__->add_columns(
-    '+lowestPriority' => { is_boolean => 1 },
-    '+suspend' => { is_boolean => 1 }
+    '+item_level_hold' => { is_boolean => 1 },
+    '+lowestPriority'  => { is_boolean => 1 },
+    '+suspend'         => { is_boolean => 1 }
 );
 
 1;
index df82898..dda3260 100644 (file)
     "item_type": {
       "type": ["string", "null"],
       "description": "If record level hold, the optional itemtype of the item the patron is requesting"
+    },
+    "item_level": {
+      "type": "boolean",
+      "description": "If the hold is placed at item level"
     }
   }
 }