You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

On this page

Use case

Inherit the value of a field of a parent issue that belongs to the upper levels of the Advanced Roadmaps hierarchy when an issue is added under it.


Configuration

Create a new rule and name it appropriately.

Field changed event


Add a Trigger → Field Changed Event

Field

Choose Parent Link

Changed to

Choose Any value

Boolean condition


Add a Condition → Boolean Condition

Expression

Introduce a boolean condition as the following one.

%{trigger.issue.project.key} = "PKEY"


Although it is not essential, a boolean condition can be useful to restrict the scope of the automation rule


Update field action


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

Field

Choose Priority

Update to

Choose Value returned by parsed expression

Parser Expression

Introduce the following expression in the expression editor in Advanced text mode after replacing the field code with the appropriate one.

first(fieldValue(%{trigger.issue.cf10302}, parent()))


Import rule

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": "Inherit value from parent in Advanced Roadmaps hierarchy",
    "description": "Inherit the value of a field of a parent issue that belongs to the upper levels of the Advanced Roadmaps hierarchy when an issue is added under it.",
    "creator": "admin",
    "status": false,
    "triggerData": "",
    "triggerType": "FIELD_CHANGED_EVENT",
    "configuration": {
        "refs": [
            "issue",
            "system",
            "trigger.issue",
            "trigger.parent"
        ],
        "fieldId": "10009",
        "option": "any",
        "triggerType": ""
    },
    "children": [
        {
            "sequence": 0,
            "type": "BOOLEAN_CONDITION",
            "ruleEntityType": "CONDITION",
            "configuration": {
                "refs": [
                    "issue",
                    "project",
                    "system",
                    "trigger",
                    "trigger.issue",
                    "trigger.parent"
                ],
                "expression": "%{trigger.issue.project.key} = \"PKEY\"",
                "expressionParsingMode": "logical",
                "actingUser": "field_00020"
            },
            "children": [
                {
                    "sequence": 0,
                    "type": "UPDATE_FIELD",
                    "ruleEntityType": "ACTION",
                    "configuration": {
                        "refs": [
                            "issue",
                            "project",
                            "system",
                            "trigger",
                            "trigger.issue",
                            "trigger.parent"
                        ],
                        "fieldId": "10302",
                        "mode": "parser",
                        "value": "first(fieldValue(%{trigger.issue.cf10302}, parent()))",
                        "valueParsingMode": "textAdvanced",
                        "sendMail": "true",
                        "actingUser": "field_00020"
                    },
                    "children": null,
                    "hasChildren": false
                }
            ],
            "hasChildren": true
        }
    ],
    "hasChildren": true
}



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