Skip to content

[8.19] UI bug when editing Elasticsearch query alert rule "GROUPED OVER" a runtime_mapping field (#223975)#224319

Closed
kibanamachine wants to merge 1 commit intoelastic:8.19from
kibanamachine:backport/8.19/pr-223975
Closed

[8.19] UI bug when editing Elasticsearch query alert rule "GROUPED OVER" a runtime_mapping field (#223975)#224319
kibanamachine wants to merge 1 commit intoelastic:8.19from
kibanamachine:backport/8.19/pr-223975

Conversation

@kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.19:

Questions ?

Please refer to the Backport tool documentation

…untime_mapping field (elastic#223975)

Resolves elastic#221447

## Summary

This PR fixes a UI bug when editing an ES query rule that's grouping
over a runtime field.

### Checklist

Check the PR satisfies following conditions.

- [ ] [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

### To verify

1. Create a DSL ES Query rule and include a runtime field. Here is an
example that I like to use
```
  "runtime_mappings": {
    "day_of_week": {
      "type": "keyword",
      "script": {
        "source": "emit(doc['@timestamp'].value.dayOfWeekEnum.getDisplayName(TextStyle.FULL, Locale.ENGLISH))"
      }
    }
  },

```
2. Select that field to groupover and save your rule
3. Edit your rule and click on `GROUPED OVER`, verify that there is no
error and the runtime field is selected

(cherry picked from commit 0a5df04)
@kibanamachine kibanamachine added the backport This PR is a backport of another PR label Jun 17, 2025
@kibanamachine kibanamachine enabled auto-merge (squash) June 17, 2025 18:26
@elasticmachine
Copy link
Contributor

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #14 / aiops log rate analysis in cases attaches log rate analysis to a case
  • [job] [logs] Jest Tests #14 / EsQueryRuleTypeExpression should render EsQueryRuleTypeExpression with chosen runtime group field
  • [job] [logs] Jest Tests #14 / EsQueryRuleTypeExpression should render EsQueryRuleTypeExpression with chosen runtime group field

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
stackAlerts 65.6KB 65.6KB +69.0B

cc @doakalexi

@doakalexi doakalexi closed this Jun 20, 2025
auto-merge was automatically disabled June 20, 2025 14:54

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants