From 359780886ea0b4211ffd18bbc5608dae8c9d1fd1 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 1 Mar 2023 12:31:17 +0100 Subject: [PATCH] Bug 33103: Make vendors searchable by aliases Signed-off-by: Jonathan Field Signed-off-by: Tomas Cohen Arazi --- acqui/booksellers.pl | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/acqui/booksellers.pl b/acqui/booksellers.pl index 43407ddad8..c9476f6179 100755 --- a/acqui/booksellers.pl +++ b/acqui/booksellers.pl @@ -82,8 +82,15 @@ if ($booksellerid) { push @suppliers, Koha::Acquisition::Booksellers->find( $booksellerid ); } else { @suppliers = Koha::Acquisition::Booksellers->search( - { name => { -like => "%$supplier%" } }, - { order_by => { -asc => 'name' } } )->as_list; + [ + { name => { -like => "%$supplier%" } }, + { 'aqbookseller_aliases.alias' => { -like => "%$supplier%" } }, + ], + { + order_by => { -asc => 'name' }, + join => 'aqbookseller_aliases', + } + )->as_list; } my $supplier_count = @suppliers; -- 2.39.5