Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.11] [Dashboard Navigation] Fix reference extract method (elastic#1…
…71360) (elastic#171561) # Backport This will backport the following commits from `main` to `8.11`: - [[Dashboard Navigation] Fix reference extract method (elastic#171360)](elastic#171360) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Hannah Mudge","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-11-20T16:40:07Z","message":"[Dashboard Navigation] Fix reference extract method (elastic#171360)\n\nCloses https://github.com/elastic/kibana/issues/164212\r\nCloses https://github.com/elastic/kibana/issues/171328\r\n\r\n## Summary\r\n\r\nIn `extractReferences`, the links in the `links` array attribute is [not\r\nextensible](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Cant_define_property_object_not_extensible)\r\n- this means that we cannot add or delete properties from each\r\nindividual link directly. Instead, I've had to create a clone of each\r\ndashboard link via the spread operator so that we aren't modifying the\r\noriginal link directly.\r\n\r\n**How to Test**\r\n1. Create a by-value Links panel\r\n2. Refresh the dashboard\r\n3. Save the Links panel to the library via the panel action\r\n4. The panel should be saved successfully **and** the panel title should\r\nbe updated.\r\n\r\n[**Flaky Test\r\nRunner**](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4024)\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/8698078/b8949d44-697d-414a-9e98-14b0a6f67b31)\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [x] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"49b52fe76e480c24673c8e1573346fb279ea965f","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Dashboard","release_note:fix","Team:Presentation","loe:small","impact:high","backport:prev-minor","Project:Dashboard Navigation","v8.12.0"],"number":171360,"url":"https://github.com/elastic/kibana/pull/171360","mergeCommit":{"message":"[Dashboard Navigation] Fix reference extract method (elastic#171360)\n\nCloses https://github.com/elastic/kibana/issues/164212\r\nCloses https://github.com/elastic/kibana/issues/171328\r\n\r\n## Summary\r\n\r\nIn `extractReferences`, the links in the `links` array attribute is [not\r\nextensible](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Cant_define_property_object_not_extensible)\r\n- this means that we cannot add or delete properties from each\r\nindividual link directly. Instead, I've had to create a clone of each\r\ndashboard link via the spread operator so that we aren't modifying the\r\noriginal link directly.\r\n\r\n**How to Test**\r\n1. Create a by-value Links panel\r\n2. Refresh the dashboard\r\n3. Save the Links panel to the library via the panel action\r\n4. The panel should be saved successfully **and** the panel title should\r\nbe updated.\r\n\r\n[**Flaky Test\r\nRunner**](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4024)\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/8698078/b8949d44-697d-414a-9e98-14b0a6f67b31)\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [x] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"49b52fe76e480c24673c8e1573346fb279ea965f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/171360","number":171360,"mergeCommit":{"message":"[Dashboard Navigation] Fix reference extract method (elastic#171360)\n\nCloses https://github.com/elastic/kibana/issues/164212\r\nCloses https://github.com/elastic/kibana/issues/171328\r\n\r\n## Summary\r\n\r\nIn `extractReferences`, the links in the `links` array attribute is [not\r\nextensible](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Cant_define_property_object_not_extensible)\r\n- this means that we cannot add or delete properties from each\r\nindividual link directly. Instead, I've had to create a clone of each\r\ndashboard link via the spread operator so that we aren't modifying the\r\noriginal link directly.\r\n\r\n**How to Test**\r\n1. Create a by-value Links panel\r\n2. Refresh the dashboard\r\n3. Save the Links panel to the library via the panel action\r\n4. The panel should be saved successfully **and** the panel title should\r\nbe updated.\r\n\r\n[**Flaky Test\r\nRunner**](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4024)\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/8698078/b8949d44-697d-414a-9e98-14b0a6f67b31)\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [x] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"49b52fe76e480c24673c8e1573346fb279ea965f"}}]}] BACKPORT--> Co-authored-by: Hannah Mudge <[email protected]>
- Loading branch information