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).*
stylecircle
typeflat
separatorpipe



UI Text Box
sizemedium
typeinfo

Use case

Often it is necessary to keep parent issues and sub-tasks in sync. To do so, the following automation rule comes with a handy configuration that automatically updates specific sub-tasks' field values with their corresponding parent issue's value.

In our use case we want to automatically update the priority field.




UI Steps

Field changed event

UI Step

Excerpt Include
DECADIS:Automation Use Case - Create Rule Step
DECADIS:Automation Use Case - Create Rule Step
nopaneltrue


UI Step

Add a Trigger → Field Changed Event

UI Steps


UI Step

Field

Choose Priority


UI Step

Changed to

Choose Any value



Issue selector

UI Step

Add SelectorIssue selector → Sub-tasks

UI Text Box
typeinfo

No further configuration needed.


 Update field configration

UI Step


UI Steps


UI Step

Next to Issue selector click on Add → Action → Update Field


UI Step

Field

Choose Priority


UI Step

Update to

Choose Value returned by parsed expression


UI Step

Parser Expression

Code Block
languagebash
%{trigger.issue.priority}
# Since we want to get the value from that issue that is triggering the rule, we add the "trigger" prefix.


UI Text Box
typeinfo
Both basic text and advanced text parsing modes work for this expression.





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




Screencast

This is how the configuration above should look on your screen

Multimedia
namekeep_priority_of_parents_and_sub-tasks_in_sync.mp4
width700


Import 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": "Keep priority of parents and sub-tasks in sync",
    "description": "",
    "creator": "admin",
    "status": false,
    "triggerData": "",
    "triggerType": "FIELD_CHANGED_EVENT",
    "configuration": {
        "refs": [
            "issue",
            "system",
            "trigger.issue",
            "trigger.parent"
        ],
        "fieldId": "00017",
        "option": "any",
        "triggerType": ""
    },
    "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": "UPDATE_FIELD",
                    "ruleEntityType": "ACTION",
                    "configuration": {
                        "refs": [
                            "issue",
                            "issues",
                            "project",
                            "selector.issue",
                            "selector.parent",
                            "system",
                            "trigger",
                            "trigger.issue",
                            "trigger.parent"
                        ],
                        "fieldId": "00017",
                        "mode": "parser",
                        "value": "%{trigger.issue.priority}",
                        "valueParsingMode": "textAdvanced",
                        "sendMail": "true",
                        "actingUser": "field_00020"
                    },
                    "children": null,
                    "hasChildren": false
                }
            ],
            "hasChildren": true
        }
    ],
    "hasChildren": true
}




Related examples

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


Excerpt Include
DECADIS:Contact support
DECADIS:Contact support
nopaneltrue


Page properties
hiddentrue


JWT feature

Automated actionUpdate field action
Label




Page properties
hiddentrue



Status
Tech review

Status
colourGreen
titleto dodone

Style guide

Status
colourGreen
titledone

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