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

Duplicate Action does not work on some objects #6900

Closed
7 tasks
unlikelyzero opened this issue Aug 7, 2023 · 6 comments · Fixed by #6904
Closed
7 tasks

Duplicate Action does not work on some objects #6900

unlikelyzero opened this issue Aug 7, 2023 · 6 comments · Fixed by #6904

Comments

@unlikelyzero
Copy link
Collaborator

unlikelyzero commented Aug 7, 2023

Summary

Clone of VIPEROMCT-382

Some complex objects cannot be duplicated and instead throw an error in the console

Repro steps:

Navigate to https://#/browse/mine/e3d29a3a-08ff-4c7d-b32d-df130c2ebaef/87a24f2a-0011-4d08-8485-87505c3f4f5e?tc.mode=remote-clock&tc.startDelta=900000&tc.endDelta=15000&tc.timeSystem=utc&view=layout.view
Right click on the display in the tree and click on "Duplicate"
Attempt to duplicate the display into another folder
Note that nothing appears to happen in the UI, and the JavaScript console contains an error -

Uncaught (in promise) TypeError: Cannot convert undefined or null to object
    at hasOwnProperty (<anonymous>)
    at Object.eval (DuplicateTask.js:224:1)
    at JSON.parse (<anonymous>)
    at DuplicateTask.rewriteIdentifiers (DuplicateTask.js:222:1)
    at DuplicateTask.duplicateComposees (DuplicateTask.js:198:1)

Impact Check List

  • Data loss or misrepresented data?
  • Regression? Did this used to work or has it always been broken?
  • Is there a workaround available?
  • Does this impact a critical component?
  • Is this just a visual bug with no functional impact?
  • Does this block the execution of e2e tests?
  • Does this have an impact on Performance?
@scottbell
Copy link
Contributor

I'm having trouble replicating this, but the issue appears to be here in the reviver, where presumably it's being passed a null or undefined.

@scottbell
Copy link
Contributor

With @unlikelyzero's help, I was able to replicate. The issue is in the layout, one of the items has a height & width with values of null. The duplicate action isn't checking for null or undefined before calling hasOwnProperty.

@scottbell
Copy link
Contributor

scottbell commented Aug 9, 2023

It's the LineComponent's height and width that's the issue, and may be related to this.

@scottbell scottbell linked a pull request Aug 9, 2023 that will close this issue
15 tasks
@ozyx ozyx added this to the Target:3.0.1 milestone Aug 9, 2023
@ozyx ozyx added the unverified label Aug 9, 2023
@ozyx ozyx closed this as completed in #6904 Aug 9, 2023
@charlesh88
Copy link
Contributor

Verified fixed Testathon 2023-08-23.

@khalidadil
Copy link
Contributor

Verified Fixed in Testathon on 08/24/23. Was successfully able to clone the layout to another folder and did not see an error in the console.

@ozyx
Copy link
Member

ozyx commented Aug 24, 2023

Verified fixed 8/24/23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants