Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save object workflow does not use existing ID #9012

Closed
tbragin opened this issue Nov 8, 2016 · 5 comments
Closed

Save object workflow does not use existing ID #9012

tbragin opened this issue Nov 8, 2016 · 5 comments
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Dashboard Dashboard related features Feature:Visualizations Generic visualization features (in case no more specific feature label is available) WIP Work in progress

Comments

@tbragin
Copy link
Contributor

tbragin commented Nov 8, 2016

Kibana version:
4.x through 5.0.0-GA

Description of the problem including expected versus actual behavior:
When saving a visualization, Kibana always uses the chart title to generate an ID that it uses to save the visualization, even when editing an existing chart that already has an ID.

Steps to repro:

  1. Create Visualization Named X
  2. Edit Saved Object, change "title" to X - 2
  3. Add X-2 to a dashboard.
  4. Edit X-2 in some obvious way (colors worked for me)
  5. Save X-2 (note that you are not prompted to overwrite the existing visualization you are editing).
  6. Observe that there are now TWO X - 2 visualizations in the Saved objects list (this is bug links to styles and js #1).
  7. Add the newly saved X - 2 item to your dashboard, so now you have two X - 2 visualizations on the same dashboard, and they differ by color.
  8. Edit the "original X - 2" visualization - observe that it opens the correct visualization with the right colors, etc. Change the colors to a 3rd option.
  9. Save it, agree to overwrite.
  10. Open the dashboard, observe that the "original X - 2" visualization was not changed, but the "second X-2" visualization was incorrectly updated.
@tbragin tbragin added Feature:Dashboard Dashboard related features :Sharing Feature:Visualizations Generic visualization features (in case no more specific feature label is available) bug Fixes for quality problems that affect the customer experience labels Nov 8, 2016
@tbragin
Copy link
Contributor Author

tbragin commented Nov 9, 2016

This might be a specific instance of what is described above in the context of Visualize only: #7720

@tbragin tbragin added the P2 label Nov 9, 2016
@stacey-gammon
Copy link
Contributor

We are inconsistent in how we handle a rename. If you go through the "Save" panel, it creates a new id, but if you edit through Saved Object, it retains the original id.

If we decide to go with the Saved Object method, and keep the id across renames, we'll have to better handle id clashes (for instance if you renamed X to X2 and then created a new vis named X, we should allow that instead of having it overwrite X2). We'll probably need to autogenerate unique ids to get around this.

Should we continue allowing duplicate visualization names, or warn/error in that situation?

If we retain the original id, we may want to expose a "save as" or "copy" functionality to easily allow for duplicates, if that is a common use case.

@stacey-gammon
Copy link
Contributor

stacey-gammon commented Nov 9, 2016

btw this affects dashboard renames as well. Consider the following situation:

  1. Create a dashboard named d1.
  2. Go to Saved Objects and rename d1 to d1-change
  3. Create a new dashboard and try to save it as d1

You'll see the warning about 'are you sure you want to overwrite d1?'. This is confusing because there is no longer a dashboard named d1. If you say yes, it will actually overwrite the dashboard named d1-change.

@stacey-gammon
Copy link
Contributor

PR #9087 will fix this.

@tbragin
Copy link
Contributor Author

tbragin commented Dec 6, 2016

PR is merged, so closing this.

@tbragin tbragin closed this as completed Dec 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Dashboard Dashboard related features Feature:Visualizations Generic visualization features (in case no more specific feature label is available) WIP Work in progress
Projects
None yet
Development

No branches or pull requests

2 participants