JSM Cloud Automation rule failing with the error 'You are currently not a member of the project role: Service Desk Team. (commentLevel)'
Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.
Summary
When you use an automation rule to add comments to the issue with actor as Automation for Jira, the comments are not added but throw an error in the rule audit log.
Environment
Jira Service Management Cloud
Diagnosis
When you use an automation rule to add comments to the issue with actor as Automation for Jira, it throws the below error in the rule audit log:
Error adding comment to issue |
---|
Under Project settings > Permissions, the Browse Projects permission, Service Project Agent permission, and Comments Permissions are already granted to the Project Role atlassian-addons-project-access in the permission scheme.
Cause
When the automation rule was executed by the actor Automation for Jira, the app user isn't related to the Service Desk Team role and returned the error.
Solution
You need to give Service Desk Team role to Automation for Jira user to fix this permission error.
You can go to Project settings → People and add com.codebarrel.addons.automation@connect.atlassian.com (email address for Automation for Jira user) with the Service Desk Team Role.
But sometimes, this step can give an error like the one below:
In that case, you can use the below URL (replace <yourinstance.atlassian.net> with the URL of your Atlassian cloud instance) to go to View Project Roles of Automation for Jira user and use the Edit Project Roles tab to grant Service Desk Team role directly in the impacted project.
https://<yourinstance.atlassian.net>/secure/admin/roles/ViewUserProjectRoles.jspa?accountId=557058%3Af58131cb-b67d-43c7-b30d-6b58d40bd077