On this page

Use case

According to this use case, often it might be helpful to have a predefined set of issues for testing purposes. But if you've created several issues, wouldn't it be great to delete them as quickly as they were created? Take the following rule and save time!


 Manual trigger

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 → Manual

No further configuration needed. The rule will only be executed if a user hits the Execute button .

 JQL Selector

Add Selector → JQL Selector

Use the following Expression:

parent = nnnnn

nnnnn has to be an issue key. In this we are going to delete all issues that are sub-tasks under the specified issue.

But you can also adapt the configuration to your needs!

 Delete issue action

Next to the JQL Selector click on Add → Action → Delete issue

No further configuration needed.


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": "# Delete test issues",
    "description": "",
    "creator": "admin",
    "status": false,
    "triggerData": "",
    "triggerType": "MANUAL",
    "configuration": {
        "refs": [
            "issue",
            "system",
            "trigger.issue",
            "trigger.parent"
        ],
        "actingUser": "field_00020",
        "triggerType": ""
    },
    "children": [
        {
            "sequence": 0,
            "type": "JQL_SELECTOR",
            "ruleEntityType": "SELECTOR",
            "configuration": {
                "refs": [
                    "system"
                ],
                "jql": "parent = EO-57",
                "jqlParsingMode": "jql",
                "actingUser": "field_00020"
            },
            "children": [
                {
                    "sequence": 0,
                    "type": "DELETE_ISSUE",
                    "ruleEntityType": "ACTION",
                    "configuration": {
                        "refs": [
                            "issue",
                            "issues",
                            "selector.issue",
                            "selector.parent",
                            "system"
                        ],
                        "actingUser": "field_00020"
                    },
                    "children": null,
                    "hasChildren": false
                }
            ],
            "hasChildren": true
        }
    ],
    "hasChildren": true
}


 Related use cases


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