Skip to content

[Dashboards] Soften validation on filter schema#237477

Merged
nickpeihl merged 1 commit intoelastic:mainfrom
nickpeihl:fix-combined-filters
Oct 3, 2025
Merged

[Dashboards] Soften validation on filter schema#237477
nickpeihl merged 1 commit intoelastic:mainfrom
nickpeihl:fix-combined-filters

Conversation

@nickpeihl
Copy link
Copy Markdown
Contributor

@nickpeihl nickpeihl commented Oct 3, 2025

Fixes #237472

Fixes a bug where dashboards can not be saved when a filter pill has a combined filter using OR or AND operations.

The filters schema from the package that dashboard uses in it's validation does not account for combined filters in the filter pills. I recommend we fall back to softening the validation while we work on these schemas for the public API.

@nickpeihl nickpeihl requested a review from a team as a code owner October 3, 2025 13:07
@nickpeihl nickpeihl added release_note:fix Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas t// Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// backport:version Backport to applied version labels v9.2.0 labels Oct 3, 2025
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

params: schema.maybe(schema.any()),
value: schema.maybe(schema.string()),
},
{ unknowns: 'allow' }
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is the key change. These rest of the diff is formatting.

@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

Copy link
Copy Markdown
Contributor

@davismcphee davismcphee left a comment

Choose a reason for hiding this comment

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

Code-only review, Data Discovery changes LGTM 👍

@nickpeihl nickpeihl merged commit 393580e into elastic:main Oct 3, 2025
25 checks passed
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 9.2

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 3, 2025
Fixes elastic#237472

Fixes a bug where dashboards can not be saved when a filter pill has a
combined filter using OR or AND operations.

The filters schema from the package that dashboard uses in it's
validation does not account for combined filters in the filter pills. I
recommend we fall back to softening the validation while we work on
these schemas for the public API.

(cherry picked from commit 393580e)
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
9.2

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 Oct 3, 2025
)

# Backport

This will backport the following commits from `main` to `9.2`:
- [[Dashboards] Soften validation on filter schema
(#237477)](#237477)

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

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

<!--BACKPORT [{"author":{"name":"Nick
Peihl","email":"nick.peihl@elastic.co"},"sourceCommit":{"committedDate":"2025-10-03T20:13:51Z","message":"[Dashboards]
Soften validation on filter schema (#237477)\n\nFixes
https://github.com/elastic/kibana/issues/237472\n\nFixes a bug where
dashboards can not be saved when a filter pill has a\ncombined filter
using OR or AND operations.\n\nThe filters schema from the package that
dashboard uses in it's\nvalidation does not account for combined filters
in the filter pills. I\nrecommend we fall back to softening the
validation while we work on\nthese schemas for the public
API.","sha":"393580e7777d3e7fdaef58eb64ae3bff21513069","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Presentation","Team:DataDiscovery","backport:version","v9.2.0","v9.3.0"],"title":"[Dashboards]
Soften validation on filter
schema","number":237477,"url":"https://github.com/elastic/kibana/pull/237477","mergeCommit":{"message":"[Dashboards]
Soften validation on filter schema (#237477)\n\nFixes
https://github.com/elastic/kibana/issues/237472\n\nFixes a bug where
dashboards can not be saved when a filter pill has a\ncombined filter
using OR or AND operations.\n\nThe filters schema from the package that
dashboard uses in it's\nvalidation does not account for combined filters
in the filter pills. I\nrecommend we fall back to softening the
validation while we work on\nthese schemas for the public
API.","sha":"393580e7777d3e7fdaef58eb64ae3bff21513069"}},"sourceBranch":"main","suggestedTargetBranches":["9.2"],"targetPullRequestStates":[{"branch":"9.2","label":"v9.2.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/237477","number":237477,"mergeCommit":{"message":"[Dashboards]
Soften validation on filter schema (#237477)\n\nFixes
https://github.com/elastic/kibana/issues/237472\n\nFixes a bug where
dashboards can not be saved when a filter pill has a\ncombined filter
using OR or AND operations.\n\nThe filters schema from the package that
dashboard uses in it's\nvalidation does not account for combined filters
in the filter pills. I\nrecommend we fall back to softening the
validation while we work on\nthese schemas for the public
API.","sha":"393580e7777d3e7fdaef58eb64ae3bff21513069"}}]}] BACKPORT-->

Co-authored-by: Nick Peihl <nick.peihl@elastic.co>
rylnd pushed a commit to rylnd/kibana that referenced this pull request Oct 17, 2025
Fixes elastic#237472

Fixes a bug where dashboards can not be saved when a filter pill has a
combined filter using OR or AND operations.

The filters schema from the package that dashboard uses in it's
validation does not account for combined filters in the filter pills. I
recommend we fall back to softening the validation while we work on
these schemas for the public API.
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:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas t// v9.2.0 v9.3.0

4 participants