Bug 29422

Summary: Add additional match types to dataTables api wrapper
Product: Koha Reporter: Martin Renvoize <martin.renvoize>
Component: Architecture, internals, and plumbingAssignee: Martin Renvoize <martin.renvoize>
Status: BLOCKED --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: jonathan.druart, testopia, tomascohen
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34226
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34352
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 29302    
Bug Blocks:    
Attachments: Bug 29422: Add `before`, `after` and `between` match options

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.