Bug 28641: ILLHiddenRequestStatuses does not consider custom statuses

This patch adds the status_alias column to the ILLHiddenRequestStatuses sys pref check.
Because requests will have status_alias NULL by default, we also check for that.

Test plan:
Create multiple ILL requests of different backends and place them in different status (NEW, COMP, REQ, etc)
Create multiple ILLSTATUS entries
Add and remove a mix of both status and status_alias codes in ILLHiddenRequestStatuses and refresh the ILL requests page to confirm the result is according to expectation.

Sponsored-by: PTFS Europe

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Pedro Amorim 2023-02-02 17:55:10 +00:00 committed by Tomas Cohen Arazi
parent b0a570796c
commit aaa5bcd16b
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
1 changed files with 9 additions and 1 deletions

View File

@ -64,7 +64,15 @@ sub list {
# If necessary, only get those from a specified patron
my @requests = Koha::Illrequests->search({
$hidden_statuses
? ( status => { 'not in' => $hidden_statuses } )
? (
-and => {
status => { 'not in' => $hidden_statuses },
status_alias => [ -or =>
{ 'not in' => $hidden_statuses },
{ '=' => undef }
]
}
)
: (),
$args->{borrowernumber}
? ( borrowernumber => $args->{borrowernumber} )