-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
Component/s: Legacy Dashboard - Dashboards & Gadgets
-
None
-
3
-
Minor
-
28
Issue Summary
We encounter this regularly during customer migrations: Our app attempts to grant itself edit permissions to add migrated gadgets to the migrated dashboards. In some fraction of requests, we receive an error message that does not seem valid.
- This generally happens during DC to cloud migrations
- This fails consistently for specific users
Steps to Reproduce
- HTTP PUT /rest/api/3/dashboard/bulk/edit - run this api with the addpermission action.
[{
"action": "addPermission",
"entityIds": [ 10001 ],
"extendAdminPermissions": true,
"permissionDetails": {
"editPermissions": [
{
"type": "user",
"user": {
"accountId": "..."
}
}
],
"sharePermissions": []
}
}]
2. The result we received from Jira contained the error message Invalid type given. Should be one of [USER, PROJECT, GROUP, PROJECT_ROLE, GLOBAL, AUTHENTICATED] for that dashboard.
Expected Results
Permission should be added for the user.
Actual Results
The below exception is thrown
Invalid type given. Should be one of [USER, PROJECT, GROUP, PROJECT_ROLE, GLOBAL, AUTHENTICATED]
Workaround
Potential workaround
- Use the "Update dashboard" API instead. The tradeoff is, this is not a bulk operation: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-dashboards/#api-rest-api-3-dashboard-id-put