On this page

Use case

Include the components of the epic to the existing ones in an issue after adding an epic link to any issue.

Configuration


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.

Field changed event

Add a Trigger → Field changed event

Fields

Choose the field Epic Link

Changed to

Choose Any value

 Update field action


Next to the Issue Selector click on Add → ActionUpdate field

Field

Choose your custom Components

Update to

Choose Value returned by parsed expression

Parser Expression

Set the mode to Advanced text and enter the following Parser Expression

"+ " + toString(fieldValue(%{issue.components}, epic()))

This expression will not overwrite the previous values of the field. In order to overwrite existing values, the plus sign at the beginning of the expression must be removed.

Enable the rule by clicking on the Enable button → 



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": "Add components of the epic to the current issue",
    "description": "Include the components of the epic to the existing ones in an issue after adding an epic link to any issue.",
    "creator": "admin",
    "status": false,
    "triggerData": "",
    "triggerType": "FIELD_CHANGED_EVENT",
    "configuration": {
        "refs": [
            "issue",
            "system",
            "trigger.issue",
            "trigger.parent"
        ],
        "fieldId": "10001",
        "option": "any"
    },
    "children": [
        {
            "sequence": 0,
            "type": "UPDATE_FIELD",
            "ruleEntityType": "ACTION",
            "configuration": {
                "refs": [
                    "issue",
                    "project",
                    "system",
                    "trigger",
                    "trigger.issue",
                    "trigger.parent"
                ],
                "fieldId": "00094",
                "mode": "parser",
                "value": "\"+ \" + toString(fieldValue(%{issue.components}, epic()))",
                "valueParsingMode": "textAdvanced",
                "actingUser": "field_00020"
            },
            "children": null,
            "hasChildren": false
        }
    ],
    "hasChildren": true
} 

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