-
-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CEP] Case Search Query support for creating calendar based dates #31410
Comments
This is awesome! I'd definitely run it by some target users if you get the chance, too - I bet they'd be excited about it.
It could, but you could accomplish the same with nested calls to |
Very nice! One caveat (from the example in the CEP) that might be worth documenting is Example:
To get that you need to apply another month end adjustment:
Edit: or alternately do the month end adjustment last:
No. Nested calls is a better way to achieve that. |
Thanks for pointing that out, I originally had the order of the functions swapped as in your alternate example and only switched them because I thought it was easier to read (without thinking about the result).
Thanks for the feedback @esoergel and @millerdev. Using nesting was my intuition as well. |
Suggested update to the example in the CEP: "cases that were opened in the previous calendar month"
I think the original second comparison |
Abstract
Define Case Search Query functions to enable the creation of calendar date ranges such as "last month" or "this week" (Monday - today).
Inspired by #31325 (comment)
Motivation
With the current functions it is possible to do basic manipulation of dates by adding or subtracting deltas from the the current date or a fixed date.
For example:
One month ago
However many use cases in reporting require calendar ranges with dates such as "the beginning of the month".
# Specification
Add a new function to the Case Search Query Language that allows manipulation of dates by adjusting parts of the date.
The function will take three arguments:
today()
month_start
do not require a valueProposed operations
Example usage
Filter cases that were opened in the previous calendar month:
Impact on users
Allow users to create queries with dynamic dates.
Impact on hosting
NA
Backwards compatibility
Since this is a new function there are no comparability issues
Release Timeline
NA
Open questions and issues
Should the function accept multiple operations:
The text was updated successfully, but these errors were encountered: