Bug 36920 - Greater/less than search option on item search page to Barcode-drop-down menu
Summary: Greater/less than search option on item search page to Barcode-drop-down menu
Status: Patch doesn't apply
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Katariina Pohto
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-22 09:59 UTC by Tuomas Kunttu
Modified: 2024-10-04 16:47 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Barcode search section on item search page (5.26 KB, image/png)
2024-05-22 09:59 UTC, Tuomas Kunttu
Details
Bug 36920: Greater/less than search option for item search page field drop-down menu (2.26 KB, patch)
2024-05-23 11:59 UTC, Katariina Pohto
Details | Diff | Splinter Review
Bug 36920: Greater/less than search option for item search page field drop-down menu (2.31 KB, patch)
2024-05-30 23:09 UTC, David Nind
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tuomas Kunttu 2024-05-22 09:59:46 UTC
Created attachment 167017 [details]
Barcode search section on item search page

In the search section on the item search page, where the drop-down menu has a barcode search by default (see attachment image), it would be useful to have the option to do greater/less than searches as well. Now there are only is/is not options.

When searching publication year in this menu, this functionality would be useful. This way you could search for works that have been published before/after a certain year. In addition, custom search fields can be added to the menu. These can be, for example, acquisition date or lastseen date. Also with these fields greater/less than searches would be useful.

In fields containing letters, greater/less than searches are not necessarily very useful, but not harmful either.
Comment 1 Katariina Pohto 2024-05-23 11:59:18 UTC
Created attachment 167105 [details] [review]
Bug 36920: Greater/less than search option for item search page field drop-down menu

This patch adds '>' and '<' operators to the search.

1. Go to item search page and navigate to the field drop-down menu (default value Barcode).
2. Note that the operator choices for this search menu are 'is' and 'is not'.
3. Apply patch and refresh cache.
4. Navigate back to the menu and note that the operator menu now includes '<' and '>'.
5. Select one of the new values and refresh page to see that the selection stays.
6. Test a field or several with the new operators to see that the new operators are working as intended.
Comment 2 David Nind 2024-05-30 23:09:53 UTC
Created attachment 167296 [details] [review]
Bug 36920: Greater/less than search option for item search page field drop-down menu

The field drop-down menu (including custom fields) can currently only use operators 'is' (LIKE)
and 'is not' (NOT LIKE). Greater and less than operators would be useful especially for date fields.
This patch adds '>' and '<' operators to the search.

1. Go to item search page and navigate to the field drop-down menu (default value Barcode).
2. Note that the operator choices for this search menu are 'is' and 'is not'.
3. Apply patch and refresh cache.
4. Navigate back to the menu and note that the operator menu now includes '<' and '>'.
5. Choose one of the new values and refresh page to see that the selection remains.
6. Test a field or several with the new operators to see that the new operators are working as intended.

Signed-off-by: David Nind <david@davidnind.com>