-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Cases] Add the ability to filter cases by date in the find and status endpoints #128652
Conversation
Pinging @elastic/response-ops (Team:ResponseOps) |
Pinging @elastic/response-ops-cases (Feature:Cases) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It all looks good to me though I have a remark: we are not testing error paths, when a malformed date is sent to the endpoint.
Can you add tests to cover those cases?
Thanks, Esteban! I do in multiple places. For example here: https://github.com/elastic/kibana/pull/128652/files#diff-bbb2457715292047ff5e11bf70e6a6e560c2674d3dd2548cdcdd54fb45efa705R524. Do you have something else in mind? |
Does it make any difference if you test more incorrect formats? If you feel this is enough then let's go with it. |
I think is fine because I mostly need to check if I catch the error correctly. I think by testing incorrect formats I will start testing the kibana core framework and in turn ES. Do you have any specific format in mind? |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Page load bundle
History
To update your PR or re-run it, just comment with: cc @cnasikas |
Summary
This PR
from
andto
query parameters.from
andto
query parameters.Closes: #128483
API usage
Find cases:
/api/cases/_find?status=closed&from=now-1w&to=now
Get status:
/api/cases/status?from=now-1M&to=now-1w
Docs Preview
https://kibana_128652.docs-preview.app.elstc.co/guide/en/kibana/master/cases-api-find-cases.html
Checklist
Delete any items that are not applicable to this PR.
For maintainers