Bug 20581: (follow-up) Overload status_alias
authorAndrew Isherwood <andrew.isherwood@ptfs-europe.com>
Wed, 6 Feb 2019 12:54:30 +0000 (12:54 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 22 Feb 2019 14:31:31 +0000 (14:31 +0000)
commitcee652af6b49aeef5aa50eb5f3888cb67f8c40f0
tree790cb10c5516e83f06c0d00f553198f085843d7e
parentfb0bc2d18cc58a66df77a8779204f07c5dccae12
Bug 20581: (follow-up) Overload status_alias

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>
Koha/Illrequest.pm