You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes KQL autocomplete in custom threshold rule creation by properly including the kql plugin in the service dependency chain.
Problem
When typing in the KQL filter field within the custom threshold rule form, users would see the error:
TypeError: Cannot read properties of undefined (reading 'autocomplete')
This occurred because the kql service was not properly injected into the Kibana context when rendering rule forms.
Root Cause
The issue had two parts:
Observability plugin: kql was declared in requiredBundles instead of requiredPlugins in kibana.jsonc. The requiredBundles only bundles code together for tree-shaking but does NOT inject plugin services at runtime.
Triggers-actions-ui plugin: Missing kql in the plugin dependencies and not passing it through the service chain to the rule form components.
E2E test:
Added new Scout test to verify KQL autocomplete works in custom threshold rule creation
Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It closes #249869
Related to: #246674
Summary
Fixes KQL autocomplete in custom threshold rule creation by properly including the
kqlplugin in the service dependency chain.Problem
When typing in the KQL filter field within the custom threshold rule form, users would see the error:
TypeError: Cannot read properties of undefined (reading 'autocomplete')This occurred because the
kqlservice was not properly injected into the Kibana context when rendering rule forms.Root Cause
The issue had two parts:
Observability plugin:
kqlwas declared inrequiredBundlesinstead ofrequiredPluginsinkibana.jsonc. TherequiredBundlesonly bundles code together for tree-shaking but does NOT inject plugin services at runtime.Triggers-actions-ui plugin: Missing
kqlin the plugin dependencies and not passing it through the service chain to the rule form components.E2E test:
Before:
Screen.Recording.2026-01-21.at.15.59.54.mov
After:
Screen.Recording.2026-01-21.at.16.01.26.mov