Overview
One or more trigger actions can be set for a named event in the workflow.
When the workflow trigger event occurs the trigger will check that any required conditions are met, and if met the "unassign"
action unassigns one user (identified by their userID
) as a reviewer from a named approval.
"unassign"
The trigger action ❗️ indicates a mandatory parameter - the assignee † If no approval is specified in the trigger action, the default approval is the approval in the state named in the trigger event condition. If there are multiple approvals in the state, the default approval is the first approval listed in the JSON markup. The Atlassian user Identification Number ("unassign"
will unassign a user to a named approval.user
ID
for the assigned user to be unassigned "user"
parameter value (a userID
value) must be specified with the "unassign"
action parameter"triggers":
[
{"event": "on-change-state",
"conditions":
[
{state: "Draft"}
],
"actions":
[
{"action": "unassign",
"approval": "Triagereview",
"user": "5d52a37ef0f22a0da2d6f070"}
]}
]
If adding the JSON trigger using workflow builder there is no need to include the opening "triggers": JSON markup notation, since it will be added by workflow builder.
userId
) is visible in the URL when viewing the User Profile
Example
We can use the "unassign"
action to unassign a user as a reviewer in a state with multiple approvals.
For example in the following Rejected state we have two approvals, each with assigned reviewers.
Adding the following JSON trigger to the applied workflow using workflow builder
[ {"event":"on-reject", "conditions": [ {"state":"Rejected"} ], "actions": [ {"action":"unassign", "user":"5e6f8b4817c6640c385edb5e", "comment":"unassigned user"} ]} ]
- listens for a rejected event (
"on-reject"
) in the Rejected state ("condition":"state":"Rejected"
) - when a single rejected event occurs, the trigger
"unassign"
action removes an assigned user (identified using their AtlassianuserID
)
As the approval is not named in the trigger action, the assigned user is removed from the default approval, Primary.
The unassignment of the reviewer is recorded in workflow history for the document.
In this example, a rejected event for either of the two approvals in the named state will cause the
"unassign"
action to occur and remove the named user from the default approval.
Related Pages
List of trigger actions
- change-state trigger action
- publish-page trigger action
- approve trigger action
- reject trigger action
- assign trigger action
- unassign trigger action
- set-expiration trigger action
- clear-expiration trigger action
- set-message trigger action
- clean-messages trigger action
- remove-restrictions trigger action
- send-email trigger action
- Users or groups within a trigger