[BUG] Index pattern service returns inconsistent title #7837
Labels
bug
Something isn't working
multiple datasource
multiple datasource project
technical debt
If not paid, jeapardizes long-term success and maintainability of the repository.
Describe the bug
The index pattern service updated the cached index pattern title to contain the datasource title in it, but this behaviour is not consistent and calling the get method on the index pattern service shows only the saved object title without the datasource in title. This leads to inconsistent behaviour in the UI.
https://github.com/opensearch-project/OpenSearch-Dashboards/blob/2.16/src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts#L124-L135
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Instead of modifying the cache, we shoud store the datasource title as well if we want to avoid another call for the datasource and only append it where we display it to the user. We should ideally never modify the raw title attribute since without it we no longer know what the index pattern title was without making a raw call to the saved object service.
OpenSearch Version
2.16
Dashboards Version
2.16
Plugins
Please list all plugins currently enabled.
Screenshots
If applicable, add screenshots to help explain your problem.
Host/Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: