From 49fa8e9641a93bda915b3544e4a425650501f020 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 --- 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.11.0