From cb4df3b29a57b62b82cf7652b40d30aea4a92d9b Mon Sep 17 00:00:00 2001 From: Matthias Meusburger Date: Mon, 20 Jan 2020 15:36:21 +0100 Subject: [PATCH] Bug 20888: (follow-up) 'is not' operator behaves as 'not like' Signed-off-by: Katrin Fischer Signed-off-by: Nick Clemens Signed-off-by: Jonathan Druart --- C4/Items.pm | 3 ++- .../intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index 740d4275f0..fa5e8f2ba6 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -1333,6 +1333,7 @@ sub _SearchItems_build_where_fragment { push @columns, Koha::Database->new()->schema()->resultset('Biblio')->result_source->columns; push @columns, Koha::Database->new()->schema()->resultset('Biblioitem')->result_source->columns; my @operators = qw(= != > < >= <= like); + push @operators, 'not like'; my $field = $filter->{field} // q{}; if ( (0 < grep { $_ eq $field } @columns) or (substr($field, 0, 5) eq 'marc:') ) { my $op = $filter->{operator}; @@ -1424,7 +1425,7 @@ A filter has the following keys: =item * query: the value to search in this column -=item * operator: comparison operator. Can be one of = != > < >= <= like +=item * operator: comparison operator. Can be one of = != > < >= <= like 'not like' =back diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt index 576497e305..5e2b11268d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt @@ -87,16 +87,16 @@ [% IF params.exists('op') %] [% ELSE %] [% END %] -- 2.39.5