From: Tomas Cohen Arazi Date: Mon, 17 Jun 2019 15:16:53 +0000 (-0300) Subject: Bug 9834: (QA follow-up) API Corrections X-Git-Url: http://git.equinoxoli.org/?p=koha-equinox.git;a=commitdiff_plain;h=5aaae31a78db533e998044d9f0bc16f7dfda06b1 Bug 9834: (QA follow-up) API Corrections Signed-off-by: Tomas Cohen Arazi Signed-off-by: Martin Renvoize --- diff --git a/Koha/REST/V1/Holds.pm b/Koha/REST/V1/Holds.pm index 58ddf1f..a74307f 100644 --- a/Koha/REST/V1/Holds.pm +++ b/Koha/REST/V1/Holds.pm @@ -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; diff --git a/Koha/Schema/Result/Reserve.pm b/Koha/Schema/Result/Reserve.pm index 8b91618..213df08 100644 --- a/Koha/Schema/Result/Reserve.pm +++ b/Koha/Schema/Result/Reserve.pm @@ -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; diff --git a/api/v1/swagger/definitions/hold.json b/api/v1/swagger/definitions/hold.json index df82898..dda3260 100644 --- a/api/v1/swagger/definitions/hold.json +++ b/api/v1/swagger/definitions/hold.json @@ -74,6 +74,10 @@ "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" } } }