Assign issues to your team during a transition

Use case

When an issue is not assigned and a transition is executed by a user in group customer, then auto-assign the issue to a random user in a specific project role to ensure the consistency and productivity of your team.


⚒️ Configuration

Issue transitioned event

Create a new rule and name it appropriately.

Providing a description will help you to identify what the rule does but this step is optional.

Add a Trigger → Issue event → Issue created

Boolean condition

Next to the Issue event click on Add → Condition → Boolean condition

Add the following expression:

Bash
isInGroup(%{system.currentUser}, "customer") and %{trigger.issue.assignee} = null

This way the assignee will only be updated, if the current user (so the user who executed the transition) is in group customer and the assignee is empty.

Assign issue

Next to the boolean condition click on AddAction→ Assign issue

Assignee

Choose User in project role

Project role

Choose the specific project role you want to use.

User selection mode

Choose Random user in selected project role

Enable the rule by clicking on the Enable button  rule-status-off.png →  rule-status-on.png

📤 Import the example

Import the JSON file below to get started in no time.

JSON
JavaScript
{
    "name": "Assign issues to your team during a transition",
    "description": "",
    "creator": "admin",
    "status": false,
    "triggerData": "",
    "triggerType": "ISSUE_TRANSITIONED_EVENT",
    "configuration": {
        "refs": [
            "issue",
            "system",
            "trigger.issue",
            "trigger.parent"
        ],
        "triggerType": ""
    },
    "children": [
        {
            "sequence": 0,
            "type": "BOOLEAN_CONDITION",
            "ruleEntityType": "CONDITION",
            "configuration": {
                "refs": [
                    "issue",
                    "project",
                    "system",
                    "trigger",
                    "trigger.issue",
                    "trigger.parent"
                ],
                "expression": "isInGroup(%{system.currentUser}, \"customer\") and %{trigger.issue.assignee} = null",
                "expressionParsingMode": "logical",
                "actingUser": "field_00020"
            },
            "children": [
                {
                    "sequence": 0,
                    "type": "ASSIGN_ISSUE",
                    "ruleEntityType": "ACTION",
                    "configuration": {
                        "refs": [
                            "issue",
                            "project",
                            "system",
                            "trigger",
                            "trigger.issue",
                            "trigger.parent"
                        ],
                        "assignMode": "projectRole",
                        "projectRole": "10001",
                        "mode": "projectRoleRandom",
                        "sendMail": "true",
                        "actingUser": "field_00020"
                    },
                    "children": null,
                    "hasChildren": false
                }
            ],
            "hasChildren": true
        }
    ],
    "hasChildren": true
}



📚 Related examples