We need Koha::Illrequest->status_alias to return the correct authorised value.
Since the foreign key uses a non-unique column, we need to take into
account the authorised value category too.
This patch overloads status_alias with some additional logic that
considers the request's branch and the authorised value category to
attempt to return the correct value.
The same logic is applied to the custom statusalias method, which
returns the entire AuthorisedValue object
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>