@@ -, +, @@ - 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/Illrequest.pm | 5 +++++ api/v1/swagger/paths/illrequests.json | 1 + koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) --- a/Koha/Illrequest.pm +++ a/Koha/Illrequest.pm @@ -1030,6 +1030,11 @@ sub TO_JSON { $object->{id_prefix} = $self->id_prefix; if ( scalar (keys %$embed) ) { + # Augment the request response with statusalias details if + # appropriate + if ( $embed->{status_alias}) { + $object->{status_alias} = $self->statusalias; + } # Augment the request response with patron details if appropriate if ( $embed->{patron} ) { my $patron = $self->patron; --- 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 @@ -219,7 +219,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' + '/api/v1/illrequests?embed=metadata,patron,capabilities,library,status_alias' ).done(function() { var data = JSON.parse(ajax.responseText); // Make a copy, we'll be removing columns next and need --