On this page

Use case

Creating repetitive issues might be time-consuming work, especially when done on a daily basis. This automation rule can be used for pre-configuring sub-tasks.

Each time a new task is created, all needed sub-tasks will be created depending on the selected values in a checkbox field.

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 repetitive issues have to be created in several projects that have different workflows. Configuring just one automation rule might then be the easier way to go.

But if this scenario is only necessary for one project and workflow, the Create issue post function would make more sense.  In this case you might want to check out our corresponding post function use case.


Issue Created 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 eventIssue Created

Create issue

Add ActionCreate issue

Issues to be created

Choose Multiple issues

Parser Expression

toStringList(%{trigger.issue.cf11500})
#Replace field code with the field code of your custom field. Use the field dropdown to automatically insert the field code

with the Parsing mode set to String List

cf11500 is the field code for the custom checkbox field to be summed up. The field code will differ in your instance.

Issue type

Choose Sub-task

Parent issue

Choose Trigger issue

Summary

Use the following parser expression in the Advanced text parsing mode:

^% 
# This is a reference to each value returned by the string list
more info...

Use # to add comments in parser expressions.

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": "Create sub-tasks depending on selected values in custom field",
    "description": "",
    "creator": "admin",
    "status": false,
    "triggerData": "1",
    "triggerType": "ISSUE_EVENT",
    "configuration": {
        "refs": [
            "issue",
            "system",
            "trigger.issue",
            "trigger.parent"
        ],
        "triggerType": "1"
    },
    "children": [
        {
            "sequence": 0,
            "type": "CREATE_ISSUE",
            "ruleEntityType": "ACTION",
            "configuration": {
                "refs": [
                    "issue",
                    "project",
                    "system",
                    "trigger",
                    "trigger.issue",
                    "trigger.parent",
                    "remote.strings"
                ],
                "issueSelectionParserValue": "toStringList(%{trigger.issue.cf12200})",
                "issueSelectionParserValueParsingMode": "strings",
                "issuetype": "5",
                "parentSelection": "eventIssue",
                "parentIssueKeyParsingMode": "textBasic",
                "projectKeyParsingMode": "textBasic",
                "actingUser": "field_00020",
                "summary": "^%",
                "summaryParsingMode": "textAdvanced",
                "descriptionParsingMode": "textBasic",
                "inheritFieldsFrom": "none",
                "inheritFieldsIssueKeyParsingMode": "textBasic",
                "inheritIssueLinks": "none",
                "inheritIssueLinksIssueKeyParsingMode": "textBasic",
                "fields": [],
                "issueLinks": [],
                "issueSelection": "strings",
                "inheritFields": []
            },
            "children": null,
            "hasChildren": false
        }
    ],
    "hasChildren": true
}



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