How to add group members as request participants
Platform Notice: Cloud Only - This article only applies to Atlassian apps on the cloud platform.
Summary
You may need to automatically include all members from a group as request participants in customer requests. It's not possible to select a group directly, but this article offers a solution to use automation to automatically add all members of a group to customer requests.
Solution
Use automation to add group members as request participants
We have an open feature request to enable selecting a group in the request participants field:
For now, an alternative solution would be to create an automation rule that provides a way to add group members as request participants.
First, Add a new custom field to a service project of the Group picker type. This field needs to be filled out with the relevant group by the time the rule is triggered. You can set the group as a default value for the field. Then, create an automation rule:
Select the trigger according to your business requirement.
Add an action Send web request. This web request will get the groupID based on the value of the custom field filled up:
Web request URL:
https://
YOURINSTANCE
.atlassian.net/rest/api/3/groups/picker?query={{issue.
CUSTOMFIELDNAME
.name.urlEncode}}&maxResults=1
HTTP Method: GET
Web request body: Empty
Check the box Delay execution of subsequent rule actions until we've received a response for this web request.
Headers: use the following as Key: Value
Accept: Application/JSON
Authorization: Basic. Please go through this article to generate basic authentication credentials for REST API.
Add another action Send web request. This web request will get group members based on the value of the custom field filled out:
Web request URL:
https://
YOURINSTANCE
.atlassian.net/rest/api/3/group/member?groupId={{webResponse.body.groups.groupId}}
HTTP Method: GET
Web request body: Empty
Check the box Delay execution of subsequent rule actions until we've received a response for this web request.
Headers: use the following as Key: Value
Accept: Application/JSON
Authorization: Basic. Please go through this article to generate basic authentication credentials for REST API.
Add an action Edit work item, to edit the Request participants using the smart value
{{webResponse.body.values.accountId}}
, as well as using the option "Copy from issue" so that the existing participants don't get overwritten.
You can also view more details about Automation rules in the document below:
Was this helpful?