On this page



Use case

Keeping parent issues and sub-tasks in sync, as described in this use case, is a lot of manual work. This automation rule will update the status of all sub-tasks based on the parent status: When the parent issue is rejected, all sub-tasks are also being rejected.



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

This use case is very useful, if there are several software projects with different workflows where all related issues have to be closed on releasing a new version. Configuring just one automation rule might then be the easier way to go. But if this scenario is only necessary for one workflow, the Transition Issues post function would make more sense. In this case you might want to check out our corresponding post function use case.





Issue transitioned event



Add a Trigger → Issue transitioned event

No further configuration needed. The automation rule is triggered every time an issue is being transitioned.



Boolean condition

Add a ConditionBoolean Condition


Expression

Use the following Parser Expression:

%{trigger.issue.status} = "Rejected"



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 .




Issue selector

Next to the Boolean Condition click on Add →  Selector → Issue Selector


Target Issue(s)

Choose Sub-tasks


Transition issue action

Next to the Issue Selector click on Add → Action → Transition issue


Mode

Transition to status


Status

Choose Rejected







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.



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": "Keep the status of parents and sub-tasks in sync",
    "description": "",
    "creator": "admin",
    "status": false,
    "triggerData": "",
    "triggerType": "ISSUE_TRANSITIONED_EVENT",
    "configuration": {
        "refs": [
            "issue",
            "system",
            "trigger.issue",
            "trigger.parent"
        ],
        "triggerType": ""
    },
    "children": [
        {
            "sequence": 1,
            "type": "BOOLEAN_CONDITION",
            "ruleEntityType": "CONDITION",
            "configuration": {
                "refs": [
                    "issue",
                    "project",
                    "system",
                    "trigger",
                    "trigger.issue",
                    "trigger.parent"
                ],
                "expression": "%{trigger.issue.status} = \"Rejected\"",
                "expressionParsingMode": "logical",
                "actingUser": "field_00020"
            },
            "children": [
                {
                    "sequence": 0,
                    "type": "ISSUE_SELECTOR",
                    "ruleEntityType": "SELECTOR",
                    "configuration": {
                        "refs": [
                            "issue",
                            "project",
                            "system",
                            "trigger",
                            "trigger.issue",
                            "trigger.parent"
                        ],
                        "option": "subtasks",
                        "issueListExpressionParsingMode": "issues",
                        "actingUser": "field_00020"
                    },
                    "children": [
                        {
                            "sequence": 0,
                            "type": "TRANSITION_ISSUE",
                            "ruleEntityType": "ACTION",
                            "configuration": {
                                "refs": [
                                    "issue",
                                    "issues",
                                    "project",
                                    "selector.issue",
                                    "selector.parent",
                                    "system",
                                    "trigger",
                                    "trigger.issue",
                                    "trigger.parent"
                                ],
                                "option": "status",
                                "status": "10002",
                                "actingUser": "field_00020"
                            },
                            "children": null,
                            "hasChildren": false
                        }
                    ],
                    "hasChildren": true
                }
            ],
            "hasChildren": true
        }
    ],
    "hasChildren": true
}




Related use cases




JWT feature

Automated actionTransition issue action
Label






Status
Tech review

Style guide