/
assign trigger action



assign trigger action

Assign trigger action

You can use the Assign workflow trigger action to assign reviewers to an approval. You can use the action to assignee a Confluence user and the members of a Confluence user group as reviewers.

cdmc_visualeditor_addtriggeraction_assign_withaddedvalues.png
Visual editor - Add Assign action

The approval assignees can be

  • a single Confluence User

  • all members of a Confluence Group

By default, assignees are added as reviewers to the first approval in the state named in the trigger condition (the default approval), but you can choose to assign reviewers to a specific approval in one of the workflow states.

You can choose a specific Confluence user as the assigner. If no assigner is selected, the assigner is the Comala Document Management app add-on user.

Assign action parameters

Action Parameter

Value

Notes

Action Parameter

Value

Notes

User MANDATORY

Confluence username

  • can be empty if a Group value is added

Only one user can be added.

Assign a selected Confluence user as a reviewer.

You must add a user if a Group value is empty.

Group MANDATORY

Confluence user group name.

  • can be empty if a User value is added

Only one user group can be added.

Assign members of a selected Confluence user group as reviewers.

You must add a user group if the User value is empty.

Assigner

The user who is added as the assigner

  • if no value is added, the app add-on user is added as the assigner

 

Approval

Approval to assign the reviewers

  • if no approval is specified, users are assigned to the default approval

Any approval in any state in the workflow can be selected.

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.

Comment

Text comment for the assignee.

Text comments are included with the assignment activity entry in the document activity report.

When the workflow Event occurs, the trigger checks that any required Conditions are met, and if met, the Assign action assigns the specified user and members of a specified user group as reviewers to an approval.

“assign” JSON code

An Assign workflow trigger action added using the visual editor is automatically displayed in the workflow code editor as an “assign” trigger action.

cdmc_codeeditor_assigntriggeraction_user_and_group_added.png
Code editor - Workflow trigger with Assign action

You can also use the code editor to add the workflow trigger and the “assign” action.

"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 or groupName 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.


† 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 code.


Example trigger code

"triggers": [ {"event": "on-change-state", "conditions": [ {"state":"Review"} ], "actions": [ {"action": "assign", "approval": "Triagereview", "user": "5d52a37ef0f22a0da2d6f070", "group": "qa_reviewers"} ]} ]

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.

image-20241009-180854.png

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. You can use the groupID or the group name:

  • "group":"qa_reviewers"

  • where "qa_reviewers" is a Confluence group name.

You can use the “unassign” trigger action to remove a Confluence user as an assignee for an approval.

Related Pages