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

Canvas workpads copied to other spaces with random ids cannot be opened #94575

Closed
legrego opened this issue Mar 15, 2021 · 6 comments · Fixed by #100579
Closed

Canvas workpads copied to other spaces with random ids cannot be opened #94575

legrego opened this issue Mar 15, 2021 · 6 comments · Fixed by #100579
Labels
bug Fixes for quality problems that affect the customer experience Feature:Canvas impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. loe:needs-research This issue requires some research before it can be worked on or estimated Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas

Comments

@legrego
Copy link
Member

legrego commented Mar 15, 2021

Kibana version: Tested 7.11.1

Steps to reproduce:

  1. Create canvas workpad in one space
  2. From Saved Objects Management, copy this workpad to another space, using the default setting to Create new objects with random IDs
  3. Navigate to the target space, and attempt to load the workpad

Expected behavior:

The workpad should load.

** Actual behavior:**

The workpad fails to load with a 404 error:

Screenshots (if relevant):

CleanShot.2021-03-15.at.10.17.27.mp4

Any additional context:

The copy operation works fine if we preserve the existing saved object id, but this is deprecated behavior.

@legrego legrego added bug Fixes for quality problems that affect the customer experience Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas Feature:Canvas labels Mar 15, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security (Team:Security)

@kibanamachine kibanamachine added impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. loe:needs-research This issue requires some research before it can be worked on or estimated labels Mar 15, 2021
@legrego
Copy link
Member Author

legrego commented Mar 15, 2021

I noticed that canvas workpads seem to have ids that start with the workpad- prefix. Is this somehow a requirement for workpads?

@crob611
Copy link
Contributor

crob611 commented Mar 15, 2021

This is a bug in the router we use. I know I opened an issue at some point but I can't seem to find it now. The issue is that when grabbing params from the route, it tries to guess if it's a number by doing a parseFloat on the param. So if the param is the string 1234-5678 a parseFloat will return the number 1234 and it will try to use that as the value, hence the 404 since that id doesn't actually exist.

We need to switch to probably react-router anyways as this router we are currently using is deprecated.

@legrego
Copy link
Member Author

legrego commented Mar 15, 2021

Thanks @crob611, I appreciate the context. I'll remove the security label then since this seems to be a bug with Canvas, and not a bug with the way we're copying these objects between spaces.

@legrego legrego removed the Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! label Mar 15, 2021
@bhavyarm
Copy link
Contributor

bhavyarm commented Mar 16, 2021

Same bug in 7.12.0. Thanks! edit: because its not fixed Bhavya. Sorry for the extra comment (SMH)

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:Canvas impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. loe:needs-research This issue requires some research before it can be worked on or estimated Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants