@@ -, +, @@ - This patch provides the illrequests API route with an additional embed, - This patch also adds the new status_alias as a default embed on the API --- Koha/REST/V1/Illrequests.pm | 3 +++ api/v1/swagger/paths/illrequests.json | 1 + koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) --- a/Koha/REST/V1/Illrequests.pm +++ a/Koha/REST/V1/Illrequests.pm @@ -156,6 +156,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; } --- a/api/v1/swagger/paths/illrequests.json +++ a/api/v1/swagger/paths/illrequests.json @@ -14,6 +14,7 @@ "items": { "type": "string", "enum": [ + "status_alias", "patron", "library", "capabilities", --- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt @@ -827,7 +827,7 @@ // Get our data from the API and process it prior to passing // it to datatables var ajax = $.ajax( - '/api/v1/illrequests?embed=metadata,patron,capabilities,library,comments' + '/api/v1/illrequests?embed=metadata,patron,capabilities,library,comments,status_alias' ).done(function() { var data = JSON.parse(ajax.responseText); // Make a copy, we'll be removing columns next and need --