[Data Views] Reset the time field when the updated index pattern does not have it#262001
Conversation
|
/flaky ftrConfig:src/platform/test/functional/apps/management/group1/config.ts:15 |
Flaky Test Runner✅ Build triggered - kibana-flaky-test-suite-runner#11461
|
Flaky Test Runner Stats🟠 Some tests failed. - kibana-flaky-test-suite-runner#11461[❌] src/platform/test/functional/apps/management/group1/config.ts: 0/15 tests passed. |
|
/flaky ftrConfig:src/platform/test/functional/apps/management/group1/config.ts:15 |
Flaky Test Runner✅ Build triggered - kibana-flaky-test-suite-runner#11464
|
Flaky Test Runner Stats🟠 Some tests failed. - kibana-flaky-test-suite-runner#11464[❌] src/platform/test/functional/apps/management/group1/config.ts: 0/15 tests passed. |
|
/flaky ftrConfig:src/platform/test/functional/apps/management/group1/config.ts:15 |
Flaky Test Runner✅ Build triggered - kibana-flaky-test-suite-runner#11483
|
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#11483[✅] src/platform/test/functional/apps/management/group1/config.ts: 15/15 tests passed. |
|
/flaky ftrConfig:src/platform/test/functional/apps/management/group1/config.ts:10 |
Flaky Test Runner✅ Build triggered - kibana-flaky-test-suite-runner#11535
|
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#11535[✅] src/platform/test/functional/apps/management/group1/config.ts: 10/10 tests passed. |
| </> | ||
| </EuiFormRow> | ||
| </> | ||
| <TimestampFieldRenderer |
There was a problem hiding this comment.
Wrapped into another component so useEffect can be used.
| if (!isLoadingOptions && value?.value && wasValueInTheListRef.current) { | ||
| wasValueInTheListRef.current = false; | ||
| reset(); | ||
| } |
There was a problem hiding this comment.
New condition to address the bug
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
History
cc @jughosta |
|
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
davismcphee
left a comment
There was a problem hiding this comment.
Works great, thanks!
|
Starting backport for target branches: 9.3, 9.4 |
… not have it (elastic#262001) - Resolves elastic#260478 ## Summary This PR resets the previously loaded time field after changing the index pattern with a time field to an index pattern without a time field while entering it in the "Create data view" flyout. ## Steps 1. Start creating a new data view 2. Enter an index pattern with a time field and wait for it to get loaded in the dropdown 3. Change the index pattern to another one without a time field and wait for the dropdown to get disabled 4. Save the data view 5. Verify that no time field is assigned for it 6. Additionally check that editing any of previously saved data views works without issues too ### Testing data ``` PUT meow PUT meow/_mapping { "properties": { "message": { "type": "keyword" }, "@timestamp": { "type": "date" } } } PUT meow/_doc/1 { "message": "test", "@timestamp": "2023-05-10T11:01:10Z" } PUT meow2 PUT meow2/_mapping { "properties": { "message": { "type": "keyword" } } } PUT meow2/_doc/1 { "message": "test2" } ``` ### Checklist - [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] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [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 4b756bb)
… not have it (elastic#262001) - Resolves elastic#260478 ## Summary This PR resets the previously loaded time field after changing the index pattern with a time field to an index pattern without a time field while entering it in the "Create data view" flyout. ## Steps 1. Start creating a new data view 2. Enter an index pattern with a time field and wait for it to get loaded in the dropdown 3. Change the index pattern to another one without a time field and wait for the dropdown to get disabled 4. Save the data view 5. Verify that no time field is assigned for it 6. Additionally check that editing any of previously saved data views works without issues too ### Testing data ``` PUT meow PUT meow/_mapping { "properties": { "message": { "type": "keyword" }, "@timestamp": { "type": "date" } } } PUT meow/_doc/1 { "message": "test", "@timestamp": "2023-05-10T11:01:10Z" } PUT meow2 PUT meow2/_mapping { "properties": { "message": { "type": "keyword" } } } PUT meow2/_doc/1 { "message": "test2" } ``` ### Checklist - [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] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [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 4b756bb)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
… not have it (elastic#262001) - Resolves elastic#260478 ## Summary This PR resets the previously loaded time field after changing the index pattern with a time field to an index pattern without a time field while entering it in the "Create data view" flyout. ## Steps 1. Start creating a new data view 2. Enter an index pattern with a time field and wait for it to get loaded in the dropdown 3. Change the index pattern to another one without a time field and wait for the dropdown to get disabled 4. Save the data view 5. Verify that no time field is assigned for it 6. Additionally check that editing any of previously saved data views works without issues too ### Testing data ``` PUT meow PUT meow/_mapping { "properties": { "message": { "type": "keyword" }, "@timestamp": { "type": "date" } } } PUT meow/_doc/1 { "message": "test", "@timestamp": "2023-05-10T11:01:10Z" } PUT meow2 PUT meow2/_mapping { "properties": { "message": { "type": "keyword" } } } PUT meow2/_doc/1 { "message": "test2" } ``` ### Checklist - [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] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [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.
…n does not have it (#262001) (#262957) # Backport This will backport the following commits from `main` to `9.4`: - [[Data Views] Reset the time field when the updated index pattern does not have it (#262001)](#262001) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Julia Rechkunova","email":"julia.rechkunova@elastic.co"},"sourceCommit":{"committedDate":"2026-04-14T07:49:11Z","message":"[Data Views] Reset the time field when the updated index pattern does not have it (#262001)\n\n- Resolves https://github.com/elastic/kibana/issues/260478\n\n## Summary\n\nThis PR resets the previously loaded time field after changing the index\npattern with a time field to an index pattern without a time field while\nentering it in the \"Create data view\" flyout.\n\n## Steps\n\n1. Start creating a new data view\n2. Enter an index pattern with a time field and wait for it to get\nloaded in the dropdown\n3. Change the index pattern to another one without a time field and wait\nfor the dropdown to get disabled\n4. Save the data view\n5. Verify that no time field is assigned for it\n6. Additionally check that editing any of previously saved data views\nworks without issues too\n\n### Testing data\n\n```\nPUT meow\n\nPUT meow/_mapping\n{\n \"properties\": {\n \"message\": {\n \"type\": \"keyword\"\n },\n \"@timestamp\": {\n \"type\": \"date\"\n }\n }\n}\nPUT meow/_doc/1\n{\n \"message\": \"test\",\n \"@timestamp\": \"2023-05-10T11:01:10Z\"\n }\n\nPUT meow2\n\nPUT meow2/_mapping\n{\n \"properties\": {\n \"message\": {\n \"type\": \"keyword\"\n }\n }\n}\nPUT meow2/_doc/1\n{\n \"message\": \"test2\"\n }\n```\n\n\n### Checklist\n\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] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\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":"4b756bb2d5b56247ce1a4f4ee19dc983d4006d4e","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Feature:Data Views","Team:DataDiscovery","backport:version","v9.4.0","v9.5.0","v9.3.4"],"title":"[Data Views] Reset the time field when the updated index pattern does not have it","number":262001,"url":"https://github.com/elastic/kibana/pull/262001","mergeCommit":{"message":"[Data Views] Reset the time field when the updated index pattern does not have it (#262001)\n\n- Resolves https://github.com/elastic/kibana/issues/260478\n\n## Summary\n\nThis PR resets the previously loaded time field after changing the index\npattern with a time field to an index pattern without a time field while\nentering it in the \"Create data view\" flyout.\n\n## Steps\n\n1. Start creating a new data view\n2. Enter an index pattern with a time field and wait for it to get\nloaded in the dropdown\n3. Change the index pattern to another one without a time field and wait\nfor the dropdown to get disabled\n4. Save the data view\n5. Verify that no time field is assigned for it\n6. Additionally check that editing any of previously saved data views\nworks without issues too\n\n### Testing data\n\n```\nPUT meow\n\nPUT meow/_mapping\n{\n \"properties\": {\n \"message\": {\n \"type\": \"keyword\"\n },\n \"@timestamp\": {\n \"type\": \"date\"\n }\n }\n}\nPUT meow/_doc/1\n{\n \"message\": \"test\",\n \"@timestamp\": \"2023-05-10T11:01:10Z\"\n }\n\nPUT meow2\n\nPUT meow2/_mapping\n{\n \"properties\": {\n \"message\": {\n \"type\": \"keyword\"\n }\n }\n}\nPUT meow2/_doc/1\n{\n \"message\": \"test2\"\n }\n```\n\n\n### Checklist\n\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] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\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":"4b756bb2d5b56247ce1a4f4ee19dc983d4006d4e"}},"sourceBranch":"main","suggestedTargetBranches":["9.4","9.3"],"targetPullRequestStates":[{"branch":"9.4","label":"v9.4.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.5.0","branchLabelMappingKey":"^v9.5.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/262001","number":262001,"mergeCommit":{"message":"[Data Views] Reset the time field when the updated index pattern does not have it (#262001)\n\n- Resolves https://github.com/elastic/kibana/issues/260478\n\n## Summary\n\nThis PR resets the previously loaded time field after changing the index\npattern with a time field to an index pattern without a time field while\nentering it in the \"Create data view\" flyout.\n\n## Steps\n\n1. Start creating a new data view\n2. Enter an index pattern with a time field and wait for it to get\nloaded in the dropdown\n3. Change the index pattern to another one without a time field and wait\nfor the dropdown to get disabled\n4. Save the data view\n5. Verify that no time field is assigned for it\n6. Additionally check that editing any of previously saved data views\nworks without issues too\n\n### Testing data\n\n```\nPUT meow\n\nPUT meow/_mapping\n{\n \"properties\": {\n \"message\": {\n \"type\": \"keyword\"\n },\n \"@timestamp\": {\n \"type\": \"date\"\n }\n }\n}\nPUT meow/_doc/1\n{\n \"message\": \"test\",\n \"@timestamp\": \"2023-05-10T11:01:10Z\"\n }\n\nPUT meow2\n\nPUT meow2/_mapping\n{\n \"properties\": {\n \"message\": {\n \"type\": \"keyword\"\n }\n }\n}\nPUT meow2/_doc/1\n{\n \"message\": \"test2\"\n }\n```\n\n\n### Checklist\n\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] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\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":"4b756bb2d5b56247ce1a4f4ee19dc983d4006d4e"}},{"branch":"9.3","label":"v9.3.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Julia Rechkunova <julia.rechkunova@elastic.co>
…n does not have it (#262001) (#262956) # Backport This will backport the following commits from `main` to `9.3`: - [[Data Views] Reset the time field when the updated index pattern does not have it (#262001)](#262001) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Julia Rechkunova","email":"julia.rechkunova@elastic.co"},"sourceCommit":{"committedDate":"2026-04-14T07:49:11Z","message":"[Data Views] Reset the time field when the updated index pattern does not have it (#262001)\n\n- Resolves https://github.com/elastic/kibana/issues/260478\n\n## Summary\n\nThis PR resets the previously loaded time field after changing the index\npattern with a time field to an index pattern without a time field while\nentering it in the \"Create data view\" flyout.\n\n## Steps\n\n1. Start creating a new data view\n2. Enter an index pattern with a time field and wait for it to get\nloaded in the dropdown\n3. Change the index pattern to another one without a time field and wait\nfor the dropdown to get disabled\n4. Save the data view\n5. Verify that no time field is assigned for it\n6. Additionally check that editing any of previously saved data views\nworks without issues too\n\n### Testing data\n\n```\nPUT meow\n\nPUT meow/_mapping\n{\n \"properties\": {\n \"message\": {\n \"type\": \"keyword\"\n },\n \"@timestamp\": {\n \"type\": \"date\"\n }\n }\n}\nPUT meow/_doc/1\n{\n \"message\": \"test\",\n \"@timestamp\": \"2023-05-10T11:01:10Z\"\n }\n\nPUT meow2\n\nPUT meow2/_mapping\n{\n \"properties\": {\n \"message\": {\n \"type\": \"keyword\"\n }\n }\n}\nPUT meow2/_doc/1\n{\n \"message\": \"test2\"\n }\n```\n\n\n### Checklist\n\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] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\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":"4b756bb2d5b56247ce1a4f4ee19dc983d4006d4e","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Feature:Data Views","Team:DataDiscovery","backport:version","v9.4.0","v9.5.0","v9.3.4"],"title":"[Data Views] Reset the time field when the updated index pattern does not have it","number":262001,"url":"https://github.com/elastic/kibana/pull/262001","mergeCommit":{"message":"[Data Views] Reset the time field when the updated index pattern does not have it (#262001)\n\n- Resolves https://github.com/elastic/kibana/issues/260478\n\n## Summary\n\nThis PR resets the previously loaded time field after changing the index\npattern with a time field to an index pattern without a time field while\nentering it in the \"Create data view\" flyout.\n\n## Steps\n\n1. Start creating a new data view\n2. Enter an index pattern with a time field and wait for it to get\nloaded in the dropdown\n3. Change the index pattern to another one without a time field and wait\nfor the dropdown to get disabled\n4. Save the data view\n5. Verify that no time field is assigned for it\n6. Additionally check that editing any of previously saved data views\nworks without issues too\n\n### Testing data\n\n```\nPUT meow\n\nPUT meow/_mapping\n{\n \"properties\": {\n \"message\": {\n \"type\": \"keyword\"\n },\n \"@timestamp\": {\n \"type\": \"date\"\n }\n }\n}\nPUT meow/_doc/1\n{\n \"message\": \"test\",\n \"@timestamp\": \"2023-05-10T11:01:10Z\"\n }\n\nPUT meow2\n\nPUT meow2/_mapping\n{\n \"properties\": {\n \"message\": {\n \"type\": \"keyword\"\n }\n }\n}\nPUT meow2/_doc/1\n{\n \"message\": \"test2\"\n }\n```\n\n\n### Checklist\n\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] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\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":"4b756bb2d5b56247ce1a4f4ee19dc983d4006d4e"}},"sourceBranch":"main","suggestedTargetBranches":["9.4","9.3"],"targetPullRequestStates":[{"branch":"9.4","label":"v9.4.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.5.0","branchLabelMappingKey":"^v9.5.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/262001","number":262001,"mergeCommit":{"message":"[Data Views] Reset the time field when the updated index pattern does not have it (#262001)\n\n- Resolves https://github.com/elastic/kibana/issues/260478\n\n## Summary\n\nThis PR resets the previously loaded time field after changing the index\npattern with a time field to an index pattern without a time field while\nentering it in the \"Create data view\" flyout.\n\n## Steps\n\n1. Start creating a new data view\n2. Enter an index pattern with a time field and wait for it to get\nloaded in the dropdown\n3. Change the index pattern to another one without a time field and wait\nfor the dropdown to get disabled\n4. Save the data view\n5. Verify that no time field is assigned for it\n6. Additionally check that editing any of previously saved data views\nworks without issues too\n\n### Testing data\n\n```\nPUT meow\n\nPUT meow/_mapping\n{\n \"properties\": {\n \"message\": {\n \"type\": \"keyword\"\n },\n \"@timestamp\": {\n \"type\": \"date\"\n }\n }\n}\nPUT meow/_doc/1\n{\n \"message\": \"test\",\n \"@timestamp\": \"2023-05-10T11:01:10Z\"\n }\n\nPUT meow2\n\nPUT meow2/_mapping\n{\n \"properties\": {\n \"message\": {\n \"type\": \"keyword\"\n }\n }\n}\nPUT meow2/_doc/1\n{\n \"message\": \"test2\"\n }\n```\n\n\n### Checklist\n\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] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\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":"4b756bb2d5b56247ce1a4f4ee19dc983d4006d4e"}},{"branch":"9.3","label":"v9.3.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Julia Rechkunova <julia.rechkunova@elastic.co>
Summary
This PR resets the previously loaded time field after changing the index pattern with a time field to an index pattern without a time field while entering it in the "Create data view" flyout.
Steps
Testing data
Checklist
release_note:*label is applied per the guidelinesbackport:*labels.