Skip to content

[Cases] Update total event in ES document when attaching an event#247996

Merged
christineweng merged 1 commit intoelastic:mainfrom
christineweng:cases-fix-total-event-update
Jan 7, 2026
Merged

[Cases] Update total event in ES document when attaching an event#247996
christineweng merged 1 commit intoelastic:mainfrom
christineweng:cases-fix-total-event-update

Conversation

@christineweng
Copy link
Contributor

@christineweng christineweng commented Jan 6, 2026

Summary

Ref: #245916

How to test:

  • Create a case and attach some alerts and events
  • Go to Discover, create a data view called Cases, with pattern .kibana_alerting_cases*
  • Verify the stats are populated correctly

Checklist

  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines and apply applicable backport:* labels.
@christineweng christineweng self-assigned this Jan 6, 2026
@christineweng christineweng requested a review from a team as a code owner January 6, 2026 19:25
@christineweng christineweng added release_note:fix backport:version Backport to applied version labels Team:Cases Security Solution Cases team v9.3.0 v9.2.4 labels Jan 6, 2026
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-cases (Team:Cases)

@elasticmachine
Copy link
Contributor

elasticmachine commented Jan 6, 2026

💔 Build Failed

Failed CI Steps

Metrics [docs]

✅ unchanged

History

cc @christineweng

Copy link
Contributor

@janmonschke janmonschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@christineweng christineweng merged commit 03e8ae8 into elastic:main Jan 7, 2026
13 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 9.2, 9.3

https://github.com/elastic/kibana/actions/runs/20788834216

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 7, 2026
…astic#247996)

## Summary

Ref: elastic#245916

How to test:
- Create a case and attach some alerts and events
- Go to Discover, create a data view called Cases, with pattern
`.kibana_alerting_cases*`
- Verify the stats are populated correctly

### Checklist

- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [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
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

(cherry picked from commit 03e8ae8)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 7, 2026
…astic#247996)

## Summary

Ref: elastic#245916

How to test:
- Create a case and attach some alerts and events
- Go to Discover, create a data view called Cases, with pattern
`.kibana_alerting_cases*`
- Verify the stats are populated correctly

### Checklist

- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [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
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

(cherry picked from commit 03e8ae8)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
9.2
9.3

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jan 7, 2026
…nt (#247996) (#248133)

# Backport

This will backport the following commits from `main` to `9.2`:
- [[Cases] Update total event in ES document when attaching an event
(#247996)](#247996)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT
[{"author":{"name":"christineweng","email":"18648970+christineweng@users.noreply.github.com"},"sourceCommit":{"committedDate":"2026-01-07T16:39:40Z","message":"[Cases]
Update total event in ES document when attaching an event
(#247996)\n\n## Summary\n\nRef:
https://github.com/elastic/kibana/issues/245916\n\nHow to test:\n-
Create a case and attach some alerts and events\n- Go to Discover,
create a data view called Cases, with
pattern\n`.kibana_alerting_cases*`\n- Verify the stats are populated
correctly\n\n### Checklist\n\n- [
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"03e8ae8dbbae5700cf7fe89ee77853a4ebd8b201","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","backport:version","Team:Cases","v9.3.0","v9.4.0","v9.2.4"],"title":"[Cases]
Update total event in ES document when attaching an
event","number":247996,"url":"https://github.com/elastic/kibana/pull/247996","mergeCommit":{"message":"[Cases]
Update total event in ES document when attaching an event
(#247996)\n\n## Summary\n\nRef:
https://github.com/elastic/kibana/issues/245916\n\nHow to test:\n-
Create a case and attach some alerts and events\n- Go to Discover,
create a data view called Cases, with
pattern\n`.kibana_alerting_cases*`\n- Verify the stats are populated
correctly\n\n### Checklist\n\n- [
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"03e8ae8dbbae5700cf7fe89ee77853a4ebd8b201"}},"sourceBranch":"main","suggestedTargetBranches":["9.3","9.2"],"targetPullRequestStates":[{"branch":"9.3","label":"v9.3.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/247996","number":247996,"mergeCommit":{"message":"[Cases]
Update total event in ES document when attaching an event
(#247996)\n\n## Summary\n\nRef:
https://github.com/elastic/kibana/issues/245916\n\nHow to test:\n-
Create a case and attach some alerts and events\n- Go to Discover,
create a data view called Cases, with
pattern\n`.kibana_alerting_cases*`\n- Verify the stats are populated
correctly\n\n### Checklist\n\n- [
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"03e8ae8dbbae5700cf7fe89ee77853a4ebd8b201"}},{"branch":"9.2","label":"v9.2.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: christineweng <18648970+christineweng@users.noreply.github.com>
kibanamachine added a commit that referenced this pull request Jan 7, 2026
…nt (#247996) (#248134)

# Backport

This will backport the following commits from `main` to `9.3`:
- [[Cases] Update total event in ES document when attaching an event
(#247996)](#247996)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT
[{"author":{"name":"christineweng","email":"18648970+christineweng@users.noreply.github.com"},"sourceCommit":{"committedDate":"2026-01-07T16:39:40Z","message":"[Cases]
Update total event in ES document when attaching an event
(#247996)\n\n## Summary\n\nRef:
https://github.com/elastic/kibana/issues/245916\n\nHow to test:\n-
Create a case and attach some alerts and events\n- Go to Discover,
create a data view called Cases, with
pattern\n`.kibana_alerting_cases*`\n- Verify the stats are populated
correctly\n\n### Checklist\n\n- [
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"03e8ae8dbbae5700cf7fe89ee77853a4ebd8b201","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","backport:version","Team:Cases","v9.3.0","v9.4.0","v9.2.4"],"title":"[Cases]
Update total event in ES document when attaching an
event","number":247996,"url":"https://github.com/elastic/kibana/pull/247996","mergeCommit":{"message":"[Cases]
Update total event in ES document when attaching an event
(#247996)\n\n## Summary\n\nRef:
https://github.com/elastic/kibana/issues/245916\n\nHow to test:\n-
Create a case and attach some alerts and events\n- Go to Discover,
create a data view called Cases, with
pattern\n`.kibana_alerting_cases*`\n- Verify the stats are populated
correctly\n\n### Checklist\n\n- [
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"03e8ae8dbbae5700cf7fe89ee77853a4ebd8b201"}},"sourceBranch":"main","suggestedTargetBranches":["9.3","9.2"],"targetPullRequestStates":[{"branch":"9.3","label":"v9.3.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/247996","number":247996,"mergeCommit":{"message":"[Cases]
Update total event in ES document when attaching an event
(#247996)\n\n## Summary\n\nRef:
https://github.com/elastic/kibana/issues/245916\n\nHow to test:\n-
Create a case and attach some alerts and events\n- Go to Discover,
create a data view called Cases, with
pattern\n`.kibana_alerting_cases*`\n- Verify the stats are populated
correctly\n\n### Checklist\n\n- [
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*`
labels.","sha":"03e8ae8dbbae5700cf7fe89ee77853a4ebd8b201"}},{"branch":"9.2","label":"v9.2.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: christineweng <18648970+christineweng@users.noreply.github.com>
devamanv pushed a commit to devamanv/kibana that referenced this pull request Jan 12, 2026
…astic#247996)

## Summary

Ref: elastic#245916

How to test:
- Create a case and attach some alerts and events
- Go to Discover, create a data view called Cases, with pattern
`.kibana_alerting_cases*`
- Verify the stats are populated correctly

### Checklist

- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [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
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels release_note:fix Team:Cases Security Solution Cases team v9.2.4 v9.3.0 v9.4.0

4 participants