On this page



Use case

Avoid all the manual work by automatically closing stories when the epic is completed.




Issue transitioned event


Add a Trigger → Issue transitioned event

JQL condition

Add the following expression:

status = "Done"


Issue selector

Next to the JQL condition click on Add → Selector → Issue selector.


Select Issue list expression as the target issue(s).


Add the following expression:

issuesUnderEpic()


To achieve this, the following function has been used:




JQL condition

Next to the Issue selector click on Add → Condition → JQL condition


Add the following expression:

status != "Done"




Transition issue

Next to the JQL condition click on Add → Action → Transition issue


Set the mode to transition to status and choose done as the status.







Screencast

No screencast available at the moment.


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": "Close stories when epic is completed",
    "description": "",
    "creator": "admin",
    "status": false,
    "triggerData": "",
    "triggerType": "ISSUE_TRANSITIONED_EVENT",
    "configuration": {
        "refs": [
            "issue",
            "system",
            "trigger.issue",
            "trigger.parent"
        ],
        "triggerType": ""
    },
    "children": [
        {
            "sequence": 0,
            "type": "JQL_CONDITION",
            "ruleEntityType": "CONDITION",
            "configuration": {
                "refs": [
                    "issue",
                    "project",
                    "system",
                    "trigger",
                    "trigger.issue",
                    "trigger.parent"
                ],
                "jql": "status = \"Done\"",
                "jqlParsingMode": "jql",
                "actingUser": "field_00020"
            },
            "children": [
                {
                    "sequence": 1,
                    "type": "ISSUE_SELECTOR",
                    "ruleEntityType": "SELECTOR",
                    "configuration": {
                        "refs": [
                            "issue",
                            "project",
                            "system",
                            "trigger",
                            "trigger.issue",
                            "trigger.parent"
                        ],
                        "option": "issueList",
                        "issueListExpression": "issuesUnderEpic()",
                        "issueListExpressionParsingMode": "issues",
                        "actingUser": "field_00020"
                    },
                    "children": [
                        {
                            "sequence": 1,
                            "type": "JQL_CONDITION",
                            "ruleEntityType": "CONDITION",
                            "configuration": {
                                "refs": [
                                    "issue",
                                    "issues",
                                    "project",
                                    "selector.issue",
                                    "selector.parent",
                                    "system",
                                    "trigger",
                                    "trigger.issue",
                                    "trigger.parent"
                                ],
                                "jql": "status != \"Done\"",
                                "jqlParsingMode": "jql",
                                "actingUser": "field_00020"
                            },
                            "children": [
                                {
                                    "sequence": 1,
                                    "type": "TRANSITION_ISSUE",
                                    "ruleEntityType": "ACTION",
                                    "configuration": {
                                        "refs": [
                                            "issue",
                                            "issues",
                                            "project",
                                            "selector.issue",
                                            "selector.parent",
                                            "system",
                                            "trigger",
                                            "trigger.issue",
                                            "trigger.parent"
                                        ],
                                        "option": "status",
                                        "status": "10001",
                                        "actingUser": "field_00020"
                                    },
                                    "children": null,
                                    "hasChildren": false
                                }
                            ],
                            "hasChildren": true
                        }
                    ],
                    "hasChildren": true
                }
            ],
            "hasChildren": true
        }
    ],
    "hasChildren": true
}




Related examples




JWT feature

Automated actionTransition issue action
Label






Status
Tech review

Style guide