From d8fd680d0ce034dbe1517c8e9a0642c967519a3c Mon Sep 17 00:00:00 2001 From: Andrew Isherwood Date: Tue, 17 Apr 2018 12:00:15 +0100 Subject: [PATCH] Bug 20581: API provide status_alias embed - This patch provides the illrequests API route with an additional embed, called 'status_alias'. Requesting this embed returns an object for the request's status_alias authorised value, or null if one is not set. - This patch also adds the new status_alias as a default embed on the API call made by the illlist view Signed-off-by: Niamh.Walker-Headon@it-tallaght.ie Signed-off-by: Katrin Fischer Signed-off-by: Katrin Fischer Signed-off-by: Nick Clemens --- Koha/REST/V1/Illrequests.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Koha/REST/V1/Illrequests.pm b/Koha/REST/V1/Illrequests.pm index eb3a5cf28c..94ff8ce18f 100644 --- a/Koha/REST/V1/Illrequests.pm +++ b/Koha/REST/V1/Illrequests.pm @@ -155,6 +155,9 @@ sub list { if ($embed{comments}) { $to_push->{comments} = $req->illcomments->count; } + if ($embed{status_alias}) { + $to_push->{status_alias} = $req->statusalias; + } push @output, $to_push; } -- 2.39.5