Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Panel

On this page

Table of Contents
maxLevel2
exclude(On this page|Use case|When to use).*
stylecircle
typeflat
separatorpipe



UI Text Box
sizemedium
typeinfo

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 When an issue is created, all needed sub-tasks for each option selected in the 'Checkbox' custom field are added.

Page properties
hiddentrue
Function

<link to function being used>

Use case descriptionWhen an issue is created, sub-tasks for each option selected in the 'Checkbox' custom field are added.
Complexity

Status
colourGreen
titleBeginner

will be created depending on the selected values in a checkbox field.


UI Expand
titleShould I use an automation rule or a workflow post function?


UI Text Box
typetip

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.




Image AddedIssue Created event

Image Removed Issue Event

UI Steps


UI Step
Excerpt Include

Create a new rule and name it appropriately.

DECADIS:Automation Use Case - Create Rule Step
DECADIS:Automation Use Case - Create Rule Step
nopaneltrue
UI Text Box
typetip
Providing a description will help you to identify what the rule does but this step is optional.


UI Step

Add a trigger and choose the Issue event → Issue created

UI Text Box
typeinfo

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

Image Removed Create Issue

Trigger Issue eventIssue Created

Image AddedCreate issue

UI Step

Add ActionCreate Issueissue


UI Step


UI Tabs


UI Tab
titleIssue Details


UI Steps


UI Step

Issues to be created

*

Choose Multiple issues


UI Step

Parser Expression

*

Code Block
languagebash
linenumberstrue
toStringList(%{trigger.issue.cfnnnnn})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

UI Text Box
typenote

cf11500 is the

Note

Note that: nnnnn is field code for the checkbox custom fieldcustom checkbox field to be summed up. The field code will differ in your instance.



UI Step

Issue type

*: Choose Sub-task


UI Step

Parent issue

*: 

Choose Trigger issue




UI Tab
titleFields


UI Steps


UI Step

Summary

*

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

Code Block
linenumberstrue
 ^%
^% 
# This is a reference to each value returned by the string list


ui-expand
titlemore info...


UI Text Box
typeinfo

Use # to add comments in parser expressions.








UI Step

Excerpt Include
DECADIS:Automation Use Case - Enable Rule
DECADIS:Automation Use Case - Enable Rule
nopaneltrue




Image AddedScreencast

This is how the configuration above should look on your screen

Multimedia
namecreate_sub-tasks_depending_on_selected_values_in_custom_field.mp4
width700


Image AddedImport the example

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


UI Expand
titleJSON


UI Text Box
typewarning

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.


Code Block
languagejs
themeMidnight
linenumberstrue
{
    "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
}




Image AddedRelated use cases

Page properties report
headingsAutomated action, JWT feature, Label
cqllabel = "use-case-auto" and label = "create-issue" and space = "JWTSDC"


Excerpt Include
DECADIS:Contact support
DECADIS:Contact support
nopaneltrue


Page properties
hiddentrue


JWT feature

Image Added

Automated actionCreate issue action
Parser functionstoStringList()
Label




Page properties
hiddentrue



Status
Tech review

Status
colourGreen
titledone

Style guide

Status
colourGreen
titledone

Status
titleto do
Status
colourGreen
titledone
Status
colourYellow
titleneeds review
Status
colourRed
titleflagged