Cannot import dashboard with device ID context

When importing a dashboard (with a device id context variable) into another application, the dry run import is successful but the actual import fails with an error message:

“Resource with id ~exportplaceholderid-dashboard-…-…~ has a validation error: Default value for deviceId context must be a device ID”. (… = intentionally deleted)

It is obvious that the device id does not exist in the other application as device ids are globally unique. Renaming a device with the same name as in the original app doesn’t work either.

Hi @Marco_Bernutz

I’m going to DM you to request some details specific to your applications. I’ll follow up on this thread once we’ve identified the root cause of the issue.

After some testing, I believe we’ve found the source of the issue:

If an application has a dashboard with a Device ID context variable, and is exported with Export Devices checked, and then imported with Devices unchecked, the import will fail with the error message you’re seeing.

I’ve logged this bug with our development team. In the mean time, here’s the workaround:

Export the application with Export Devices unchecked. Then, the import should succeed, regardless of which other resources are checked or unchecked. The Device ID context variable on your dashboard will still exist, with the Default Value set to the device ID from the previous application, which you’ll want to update, but it won’t throw any errors.

Please confirm this workaround is functioning on your end. I’ll return to this thread if I have an update on the fix.