Fix issue where saved searches are not updated#14452
Fix issue where saved searches are not updated#14452stacey-gammon merged 11 commits intoelastic:masterfrom
Conversation
…overridden in a dashboard.
|
I removed a retry that I thought should be irrelevant with the new more stabilized test code, but for some reason ran into the stale element reference. Adding debug messages to see if I can find out what is going on before putting the retry's back, as they shouldn't be needed... |
weltenwort
left a comment
There was a problem hiding this comment.
This is a lot less confusing 👍
The problem that remains though is that there is no indication if the sorting or column set has been overridden. But that's a separate discussion.
…pdate-untouched-saved-searches
…pdate-untouched-saved-searches
…pdate-untouched-saved-searches
|
@Bargs, if you have time to give this a look over, just take note ofhttps://github.com//issues/14674. Tests pass here incidentally because the page is reloaded. That separate bug will require new tests to specifically catch. |
Bargs
left a comment
There was a problem hiding this comment.
LGTM! Feels much more intuitive. I agree with Felix that a dirty state indicator would be nice, along with some way to easily "reset" the panel back to the saved search state. But that can certainly wait for another PR.
…pdate-untouched-saved-searches
elastic#14452) * Add tests to catch error * Fix test * Don't store column and sort state in panel uiState unless explicitly overridden in a dashboard. * add debug messages * Elements can go stale between the find by and the click event so wrap in a retry * fix bad merge with master
Release note: There has been a long standing issue where if you add a saved search to a dashboard, then go edit and save that saved search, the updates are not propagated to the dashboard. The only way, previously, to get the new changes was to remove and re-add the search from your dashboard. With this fix, that is no longer necessary. However, there is one situation when your saved search will stop updating and that is when someone has made and saved local edits to the saved search on the dashboard. For example, if you remove a column from a saved search in a dashboard panel, then save the dashboard, that search will always show that column set, even if columns are added or removed to the underlying saved search. We did it this way to still allow users to override the configuration at the dashboard level.
Fixes #9523
The issue was that we were storing the column and sort information on the panel state all the time - not just when it was explicitly overridden in a dashboard. Now, you will only lose automatic updates if a dashboard is saved with an explicit modification of columns and sort. The columns and sort are also separate, so if you simply sort, you won't see sort updates from a saved search, but you will get column modifications.