From 216bb783e04b3a0b3cbd035140f9d5b9d1a5e7bd Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Wed, 23 Feb 2022 16:30:03 -1000 Subject: [PATCH] Bug 17748: (follow-up) Fix date due column filter After items search result when entering a term in date due colum filter table is not filtered. Its is because columns from 'Issue' must be added in _SearchItems_build_where_fragment() like it has been added in SearchItems(). Test plan : 1) Perform an item search with some results beeing checked-out 2) In colum 'Date due' enter a number that is contained is some due dates, ie '2022' 3) Table results are filtered with items having search term in due date Signed-off-by: Jonathan Druart Signed-off-by: Fridolin Somers --- C4/Items.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/C4/Items.pm b/C4/Items.pm index a61fe9d0d2..6fe676814a 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -1294,6 +1294,7 @@ sub _SearchItems_build_where_fragment { my @columns = Koha::Database->new()->schema()->resultset('Item')->result_source->columns; push @columns, Koha::Database->new()->schema()->resultset('Biblio')->result_source->columns; push @columns, Koha::Database->new()->schema()->resultset('Biblioitem')->result_source->columns; + push @columns, Koha::Database->new()->schema()->resultset('Issue')->result_source->columns; my @operators = qw(= != > < >= <= is like); push @operators, 'not like'; my $field = $filter->{field} // q{}; -- 2.39.5