Skip to content

Conversation

@mariairiartef
Copy link
Contributor

@mariairiartef mariairiartef commented Dec 1, 2025

Summary

Fix #234360

Uses current references for checking if data source states are the same.

The fix: the "Apply and close" button is enabled when the data view is changed in the in-line editor.

Screen.Recording.2025-12-01.at.07.51.28.mov

Checklist

  • 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.

@mariairiartef mariairiartef added release_note:skip Skip the PR/issue when compiling release notes backport:version Backport to applied version labels v9.1.0 v8.19.0 v9.3.0 v9.2.0 labels Dec 1, 2025
@mariairiartef mariairiartef added v8.19.8 v8.19.0 v9.1.8 v9.2.2 Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// and removed v8.19.0 labels Dec 1, 2025
@mariairiartef mariairiartef marked this pull request as ready for review December 1, 2025 06:59
@mariairiartef mariairiartef requested a review from a team as a code owner December 1, 2025 06:59
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-visualizations (Team:Visualizations)

previousAttrs.references,
datasourceStates[datasourceId].state,
attributes.references
datasourceMap[datasourceId].getPersistableState(datasourceStates[datasourceId].state)
Copy link
Member

Choose a reason for hiding this comment

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

Seems to work fine, do you mind adding a comment to specify why we need to get the references from the persisted state, rather then the attributes.references?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done here

@mariairiartef mariairiartef enabled auto-merge (squash) December 3, 2025 08:10
@mariairiartef mariairiartef merged commit 57a3353 into elastic:main Dec 3, 2025
12 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19, 9.1, 9.2

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

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

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
lens 1.6MB 1.6MB +35.0B

History

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 3, 2025
…the same (elastic#244700)

## Summary

Fix elastic#234360

Uses current references for checking if data source states are the same.

The fix: the "Apply and close" button is enabled when the data view is
changed in the in-line editor.

https://github.com/user-attachments/assets/6d9a100d-1c20-4184-a861-6221a53e12c5

### Checklist

- [ ] [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 57a3353)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 3, 2025
…the same (elastic#244700)

## Summary

Fix elastic#234360

Uses current references for checking if data source states are the same.

The fix: the "Apply and close" button is enabled when the data view is
changed in the in-line editor.

https://github.com/user-attachments/assets/6d9a100d-1c20-4184-a861-6221a53e12c5

### Checklist

- [ ] [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 57a3353)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 3, 2025
…the same (elastic#244700)

## Summary

Fix elastic#234360

Uses current references for checking if data source states are the same.

The fix: the "Apply and close" button is enabled when the data view is
changed in the in-line editor.

https://github.com/user-attachments/assets/6d9a100d-1c20-4184-a861-6221a53e12c5

### Checklist

- [ ] [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 57a3353)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.19
9.1
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 Dec 3, 2025
…s are the same (#244700) (#245043)

# Backport

This will backport the following commits from `main` to `9.2`:
- [[Lens] Use current references for checking if data source states are
the same (#244700)](#244700)

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

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

<!--BACKPORT [{"author":{"name":"Maria
Iriarte","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-12-03T09:52:19Z","message":"[Lens]
Use current references for checking if data source states are the same
(#244700)\n\n## Summary\n\nFix
https://github.com/elastic/kibana/issues/234360\n\nUses current
references for checking if data source states are the same.\n\nThe fix:
the \"Apply and close\" button is enabled when the data view is\nchanged
in the in-line
editor.\n\n\nhttps://github.com/user-attachments/assets/6d9a100d-1c20-4184-a861-6221a53e12c5\n\n###
Checklist\n\n- [ ] [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":"57a3353538f365f63d743d6e421cc538175cfcb5","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Visualizations","release_note:skip","backport:version","v9.1.0","v8.19.0","v9.2.0","v9.3.0","v9.2.3","v9.1.9","v8.19.9"],"title":"[Lens]
Use current references for checking if data source states are the
same","number":244700,"url":"https://github.com/elastic/kibana/pull/244700","mergeCommit":{"message":"[Lens]
Use current references for checking if data source states are the same
(#244700)\n\n## Summary\n\nFix
https://github.com/elastic/kibana/issues/234360\n\nUses current
references for checking if data source states are the same.\n\nThe fix:
the \"Apply and close\" button is enabled when the data view is\nchanged
in the in-line
editor.\n\n\nhttps://github.com/user-attachments/assets/6d9a100d-1c20-4184-a861-6221a53e12c5\n\n###
Checklist\n\n- [ ] [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":"57a3353538f365f63d743d6e421cc538175cfcb5"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19","9.2"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"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/244700","number":244700,"mergeCommit":{"message":"[Lens]
Use current references for checking if data source states are the same
(#244700)\n\n## Summary\n\nFix
https://github.com/elastic/kibana/issues/234360\n\nUses current
references for checking if data source states are the same.\n\nThe fix:
the \"Apply and close\" button is enabled when the data view is\nchanged
in the in-line
editor.\n\n\nhttps://github.com/user-attachments/assets/6d9a100d-1c20-4184-a861-6221a53e12c5\n\n###
Checklist\n\n- [ ] [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":"57a3353538f365f63d743d6e421cc538175cfcb5"}}]}]
BACKPORT-->

Co-authored-by: Maria Iriarte <[email protected]>
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:skip Skip the PR/issue when compiling release notes Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v8.19.0 v8.19.9 v9.1.0 v9.1.9 v9.2.0 v9.2.3 v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot save changes when editor the data view in the Lens fly-out editor

5 participants