Skip to content
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] Provide case's stats information from the backend #149390

Closed
adcoelho opened this issue Jan 24, 2023 · 2 comments · Fixed by #149863
Closed

[Cases] Provide case's stats information from the backend #149390

adcoelho opened this issue Jan 24, 2023 · 2 comments · Fixed by #149863
Assignees
Labels
Feature:Cases Cases feature Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v8.7.0

Comments

@adcoelho
Copy link
Contributor

adcoelho commented Jan 24, 2023

We are currently developing a way to filter and paginate the case activity. #140096

We need a way to get the count of the different user actions associated with the current case.

cases

An internal endpoint should be created that returns the number of actions and comments associated with a case. Specifically:

GET /internal/cases/<case_id>/user_actions/_stats

Example response:

{
    total_actions: 99
    total_comments: 100
    total: ?
}
@adcoelho adcoelho added Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Feature:Cases Cases feature v8.7.0 labels Jan 24, 2023
@adcoelho adcoelho self-assigned this Jan 24, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops-cases (Feature:Cases)

adcoelho added a commit that referenced this issue Feb 1, 2023
Fixes #149390

## Summary

This PR creates an internal API to get the count of the different user
actions associated with the current case.

This will be used to help filter and paginate the case activity.

<img width="1025" alt="aux"
src="https://user-images.githubusercontent.com/1533137/215549427-373f1626-3f7a-417d-ad95-ddb47b259617.png">

**Endpoint:**
`GET /internal/cases/<case_id>/user_actions/_stats`

Example Response:

```
{
    total: 3
    total_comments: 2
    total_other_actions: 1
}
```

### Checklist

Delete any items that are not applicable to this PR.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

### For maintainers

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
kqualters-elastic pushed a commit to kqualters-elastic/kibana that referenced this issue Feb 6, 2023
…9863)

Fixes elastic#149390

## Summary

This PR creates an internal API to get the count of the different user
actions associated with the current case.

This will be used to help filter and paginate the case activity.

<img width="1025" alt="aux"
src="https://user-images.githubusercontent.com/1533137/215549427-373f1626-3f7a-417d-ad95-ddb47b259617.png">

**Endpoint:**
`GET /internal/cases/<case_id>/user_actions/_stats`

Example Response:

```
{
    total: 3
    total_comments: 2
    total_other_actions: 1
}
```

### Checklist

Delete any items that are not applicable to this PR.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

### For maintainers

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Cases Cases feature Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v8.7.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants