Bug 29422 - Add additional match types to dataTables api wrapper
Summary: Add additional match types to dataTables api wrapper
Status: BLOCKED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Martin Renvoize
QA Contact: Testopia
URL:
Keywords:
Depends on: 29302
Blocks:
  Show dependency treegraph
 
Reported: 2021-11-05 11:25 UTC by Martin Renvoize
Modified: 2023-11-07 13:40 UTC (History)
3 users (show)

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


Attachments
Bug 29422: Add `before`, `after` and `between` match options (4.61 KB, patch)
2021-11-05 11:31 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2021-11-05 11:25:40 UTC
The `criteria` key in the dataTables wrapper allows the developer to pick the type of comparison that is used in searches.  However, it is currently limited to `contains`, `starts_with`, `ends_with` and `exact`.

I propose to add some additional comparisons for numeric and date comparisons.
Comment 1 Martin Renvoize 2021-11-05 11:31:08 UTC
Created attachment 127359 [details] [review]
Bug 29422: Add `before`, `after` and `between` match options

This patch adds three new comparison operators to the datatables api
wrapper.  The allow for date (and numberic) type comparisons in
searches.

The special case `between` operator expects a string value of the form
`start:end` and will fall back to `after` comparisons if only a start
number/date is passed.