Bugzilla – Attachment 112692 Details for
Bug 20888
Allow use of boolean operator 'not' in item search
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20888: (follow-up) 'is not' operator behaves as 'not like'
Bug-20888-follow-up-is-not-operator-behaves-as-not.patch (text/plain), 2.64 KB, created by
Nick Clemens (kidclamp)
on 2020-10-30 12:31:58 UTC
(
hide
)
Description:
Bug 20888: (follow-up) 'is not' operator behaves as 'not like'
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2020-10-30 12:31:58 UTC
Size:
2.64 KB
patch
obsolete
>From 87f9f721a7a651ffb9ab344c2b5e4f6a945c6d78 Mon Sep 17 00:00:00 2001 >From: Matthias Meusburger <matthias.meusburger@biblibre.com> >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 <katrin.fischer.83@web.de> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > C4/Items.pm | 3 ++- > koha-tmpl/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 b1e8de7029..af90abcb19 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}; >@@ -1415,7 +1416,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 7d9a89a6b3..0f617070ab 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >@@ -86,16 +86,16 @@ > [% IF params.exists('op') %] > <select name="op" class="form-field-not"> > <option value="like">is</option> >- [% IF params.op == '!=' %] >- <option value="!=" selected="selected">is not</option> >+ [% IF params.op == 'not like' %] >+ <option value="not like" selected="selected">is not</option> > [% ELSE %] >- <option value="!=">is not</option> >+ <option value="not like">is not</option> > [% END %] > </select> > [% ELSE %] > <select name="op" class="form-field-not"> > <option value="like">is</option> >- <option value="!=">is not</option> >+ <option value="not like">is not</option> > </select> > [% END %] > <input type="text" name="q" class="form-field-value" value="" /> >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 20888
:
84692
|
85281
|
93347
|
93370
|
97626
|
97627
|
111265
|
111266
|
111267
|
112453
|
112454
|
112455
|
112691
| 112692 |
112693