On this page

Use case

When an issue is transitioned to the DRAFT status, the issue will be automatically re-assigned to the last assignee from the project role "Developers".


Should I use an automation rule or a workflow post function?

When to use this automation rule and when to use a workflow post function?

This use case is very useful if you need to re-assign issues across different projects and issue types.

If you only need to re-assign issues in one dedicated project or issue type context, using the Assign to project role workflow post function might be the better alternative.


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 transitioned event

 Boolean condition

Add Boolean condition and enter the following Parser Expression*

%{trigger.issue.status} = "Draft"
more info...

Boolean expressions are logical constructions that return true or false.
In this use case, the expression will only return true if the status of the issue triggering the rule is DRAFT.

 Assign issue action

Add Action → Assign issue

Assignee

Choose User in Project Role

Project role

Choose Developers

User selection mode

Choose Last assignee in selected project role

Enable the rule by clicking on the Enable button → 

Screencast

This is how the configuration above should look on your screen


 Import the example

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


JSON

After importing the JSON file, make sure to check the configuration of the rule. Non-existing configuration elements (issue types, fields, values etc.) will be highlighted.

{
    "name": "Assign issue to last assignee on 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": "%{trigger.issue.status} = \"Draft\"",
                "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": "projectRoleLast",
                        "sendMail": "true",
                        "actingUser": "field_00020"
                    },
                    "children": null,
                    "hasChildren": false
                }
            ],
            "hasChildren": true
        }
    ],
    "hasChildren": true
}



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