On this page

Use case

Add the users selected in a User Picker (multiple users) custom field as request participants.

Configuration steps

Add the Execute remote action post function to the desired transition.

Create a remote action

In Expert mode, create a new action with the following parameters:

Name

Enter Add request participants as the name of the new action.

Method

Select the POST method.

Default connection

Select the connection with the current instance.

REST path

Enter the following REST path.

/rest/servicedeskapi/request/{issueIdOrKey}/participant

REST path parameter

Set the field Issue key for the issueIdOrKey parameter.

Action body

Enter this expression in for the Action body section.

{
  "accountIds": [%{jiraExpression("issue?.customfield_nnnnn?.map(u =>'\"' + u.accountId + '\"')")}],
  "usernames": []
}

It is required to replace nnnnn with the ID of the User Picker (multiple users) field in the above expression.

Variant

Use this expression for User Picker (single user) fields if this is the type of field used for adding the request participants.

{
  "accountIds": [%{jiraExpression("
    issue.customfield_nnnnn ?
    '\"' + issue.customfield_nnnnn.accountId + '\"' :
    []
  ")}],
  "usernames": []
}

If you still have questions, feel free to refer to our support team.