assign trigger action
Overview
When the workflow trigger event occurs, the trigger checks that any required conditions are met, and if met, the "assign"
action assigns one or more users and/or groups of users as reviewers to a named approval.
One or more trigger actions can be set for a named event in the workflow.
"assign"
The trigger action "assign"
assigns a user to a named approval.
action (assign)
approval - the name of the approval to assign. If not specified, the default approval† is used
assigner - Atlassian
userID
for the assigner (if no value is added the app add-on user is the assigner for the action)user ❗️ Atlassian
userID
for the assignee (accepts one value only)group❗️ Atlassian
groupID
orgroupName
for assignees (accepts one value only)comment - comment for the assignation operation
Only one user and one group can be assigned in a single "assign"
action. You cannot add multiple values for the user or group parameters.
❗️ Mandatory parameters
user and group parameters for assignees
At least one value must be added for an assignee (using either user or group). The user parameter value must be specified unless a group is specified using the group parameter instead.
† Default approval
If no approval name is specified in the trigger action, the default approval is the approval in the state named in the trigger event condition.
If the state has multiple approvals, the default approval is the first approval listed in the state's JSON markup.
Example trigger code
"triggers":
[
{"event": "on-change-state",
"conditions":
[
{"state":"Review"}
],
"actions":
[
{"action": "assign",
"approval": "Triagereview",
"user": "5d52a37ef0f22a0da2d6f070",
"group": "qa_reviewers"}
]}
]
When adding the JSON trigger using the workflow builder visual editor, there is no need to include the opening "triggers":
JSON markup notation; it is added automatically by the workflow builder.
Notes
When assigning a reviewer, the user parameter only accepts one userID value.
The Atlassian User Identification Number (userId) is visible in the URL when viewing the User Profile.
To assign multiple users as reviewers, you must use a Confluence group for the reviewers instead of a single user by using the group parameter, for example:
"group":"qa_reviewers"
where
"qa_reviewers"
is a Confluence group name.
The group parameter value can be either the groupID or the Confluence groupName.
The trigger action "unassign"
removes a user or members of a Confluence group from a named approval.