Bug 26032: Add 'is new' filter in items search
authorFridolin Somers <fridolin.somers@biblibre.com>
Tue, 21 Jul 2020 09:43:55 +0000 (11:43 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 4 Nov 2020 11:59:32 +0000 (12:59 +0100)
commit8a874de3f42ef02d0eb9e7e8512f952da5a7152a
tree0a44beea3d0821c080d3fc8ef9c20b618edd827b
parent5da551a6a219436b001ebb0dd35b98414de1d378
Bug 26032: Add 'is new' filter in items search

In items search, add a filter on value of items.new_status with a Ignore/Yes/No.
Yes meaning != 0, No meaning = 0, with considering that NULL value is like 0.

This patch adds 'isnull' option to filter, this may be reused on other
fields.

Test plan :
1) Define an item subfield on items.new_status with authorised values YES_NO (0 or 1)
2) Edit an item A to set new_status=1
3) Edit an item B to set new_status=0
4) Perform an item search with 'is new' = 'ignore' => you get all items
5) Perform an item search with 'is new' = 'yes' => you get item A
6) Perform an item search with 'is new' = 'no' => you get all items but A

Signed-off-by: Emmi Takkinen <emmi.takkinen@outlook.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/Items.pm
catalogue/itemsearch.pl
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt