Summary: | The dataTables Koha RESTful API wrapper should allow picking match type at the column level | ||
---|---|---|---|
Product: | Koha | Reporter: | Martin Renvoize (ashimema) <martin.renvoize> |
Component: | Architecture, internals, and plumbing | Assignee: | Martin Renvoize (ashimema) <martin.renvoize> |
Status: | RESOLVED LATER | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | jonathan.druart, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 29408 | ||
Bug Blocks: | 29422 | ||
Attachments: |
Bug 29302: Allow passing of 'criteria' at the column level
Bug 29302: Allow passing of 'criteria' at the column level Bug 29302: Allow passing of 'criteria' at the column level |
Description
Martin Renvoize (ashimema)
2021-10-21 16:59:12 UTC
Created attachment 126673 [details] [review] Bug 29302: Allow passing of 'criteria' at the column level This patch adds the option to pass 'criteria' at the 'column' definition level which means you can set 'contains', 'starts_with', 'ends_with' and 'exact' match types for each different column. I ended up needing something a bit more than this in my own bug (I want 'before' and 'after' date support).. but I wanted to post the basics here as a starting point. I'm tempted to rename the key too.. 'criteria' isn't hugely clear and it took me reading the code to figure out. Perhaps 'comparator or 'comparison_operator' would more clearly reflect its function? Created attachment 127358 [details] [review] Bug 29302: Allow passing of 'criteria' at the column level This patch adds the option to pass 'criteria' at the 'column' definition level which means you can set 'contains', 'starts_with', 'ends_with' and 'exact' match types for each different column. This is a little naive in its approach. Whilst I still think it would be useful to be able to specify the match type per column, I think we need to distinguish between 'search' and 'filter' operations. When executing a 'search', it makes sense to perform 'contains', 'starts_with' type searches.. but for a 'filter' (i.e. at the individual column level) you might have a select like and want to do an 'exact' type match. As such, I think we need to be able to specify more granularly still. Created attachment 137695 [details] [review] Bug 29302: Allow passing of 'criteria' at the column level This patch adds the option to pass 'criteria' at the 'column' definition level which means you can set 'contains', 'starts_with', 'ends_with' and 'exact' match types for each different column. |