Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation rules when using Portfolio

Rai Warbasse October 28, 2022

I am attempting to use Jira Automation around Portfolio Parent links.

If the issuetype = initiative I want all portfolio children to do something

When branching, I was previously using an issue link type, which was working but when I switched to a portfolio model, I am unable to establish the proper branch rule and unable to find a functioning JQL string in automation

 

Below is my export from automation with the section highlighted:

{
    "rules": [
        {
            "id": 734,
            "clientKey": "com.codebarrel.tenant.global",
            "name": "C2COA: Initiative - Withdraw related child epics issues",
            "state": "ENABLED",
            "description": "If the initiative is withdrawn, all related epics will also be withdrawn",
            "canOtherRuleTrigger": false,
            "notifyOnError": "FIRSTERROR",
            "authorAccountId": "d198259",
            "actorAccountId": "d198259",
            "created": 1651012541409,
            "updated": 1662567073846,
            "trigger": {
                "id": "44639",
                "component": "TRIGGER",
                "schemaVersion": 1,
                "type": "jira.issue.event.trigger:transitioned",
                "value": {
                    "synchronous": false,
                    "eventKey": "jira:issue_updated",
                    "issueEvent": "issue_generic",
                    "fromStatus": [],
                    "toStatus": [
                        {
                            "type": "ID",
                            "value": "10335"
                        }
                    ]
                },
                "children": [],
                "conditions": [],
                "optimisedIds": [],
                "newComponent": false
            },
            "components": [
                {
                    "id": "44640",
                    "component": "CONDITION",
                    "schemaVersion": 1,
                    "type": "jira.condition.container.block",
                    "children": [
                        {
                            "id": "44641",
                            "component": "CONDITION_BLOCK",
                            "parentId": "44640",
                            "schemaVersion": 1,
                            "type": "jira.condition.if.block",
                            "value": {
                                "conditionMatchType": "ALL"
                            },
                            "children": [
                                {
                                    "id": "44644",
                                    "component": "BRANCH",
                                    "parentId": "44641",
                                    "schemaVersion": 1,
                                    "type": "jira.issue.related",
                                    "value": {
                                        "relatedType": "linked",
                                        "jql": "",
                                        "linkTypes": [],
                                        "onlyUpdatedIssues": false,
                                        "processIssuesInBulk": false
                                    },
                                    "children": [
                                        {
                                            "id": "44645",
                                            "component": "ACTION",
                                            "parentId": "44644",
                                            "schemaVersion": 6,
                                            "type": "jira.issue.transition",
                                            "value": {
                                                "operations": [],
                                                "sendNotifications": true,
                                                "useLegacyRendering": false,
                                                "transitionMode": "transition",
                                                "transitionMatch": "",
                                                "transition": {
                                                    "id": "71",
                                                    "workflowName": "C2COA : EPIC Workflow"
                                                },
                                                "ignoreConditions": false
                                            },
                                            "children": [],
                                            "conditions": [],
                                            "optimisedIds": [],
                                            "newComponent": false
                                        },
                                        {
                                            "id": "44646",
                                            "component": "ACTION",
                                            "parentId": "44644",
                                            "schemaVersion": 1,
                                            "type": "jira.issue.comment",
                                            "value": {
                                                "comment": "Parent or related issue was withdrawn. This issue no longer needed",
                                                "publicComment": false,
                                                "sendNotifications": true,
                                                "addCommentOnce": true,
                                                "useLegacyRendering": false
                                            },
                                            "children": [],
                                            "conditions": [],
                                            "optimisedIds": [],
                                            "newComponent": false
                                        },
                                        {
                                            "id": "44647",
                                            "component": "ACTION",
                                            "parentId": "44644",
                                            "schemaVersion": 1,
                                            "type": "jira.issue.refresh.issue",
                                            "value": {},
                                            "children": [],
                                            "conditions": [],
                                            "optimisedIds": [],
                                            "newComponent": false
                                        }
                                    ],
                                    "conditions": [],
                                    "optimisedIds": [],
                                    "newComponent": false
                                }
                            ],
                            "conditions": [
                                {
                                    "id": "44642",
                                    "component": "CONDITION",
                                    "conditionParentId": "44641",
                                    "schemaVersion": 3,
                                    "type": "jira.issue.condition",
                                    "value": {
                                        "selectedField": {
                                            "type": "ID",
                                            "value": "issuetype"
                                        },
                                        "selectedFieldType": "issuetype",
                                        "comparison": "EQUALS",
                                        "compareValue": {
                                            "type": "ID",
                                            "value": "10210",
                                            "multiValue": false
                                        }
                                    },
                                    "children": [],
                                    "conditions": [],
                                    "optimisedIds": [],
                                    "newComponent": false
                                },
                                {
                                    "id": "44643",
                                    "component": "CONDITION",
                                    "conditionParentId": "44641",
                                    "schemaVersion": 3,
                                    "type": "jira.issue.condition",
                                    "value": {
                                        "selectedField": {
                                            "type": "ID",
                                            "value": "project"
                                        },
                                        "selectedFieldType": "project",
                                        "comparison": "EQUALS",
                                        "compareValue": {
                                            "type": "ID",
                                            "value": "29100",
                                            "multiValue": false
                                        }
                                    },
                                    "children": [],
                                    "conditions": [],
                                    "optimisedIds": [],
                                    "newComponent": false
                                }
                            ],
                            "optimisedIds": [],
                            "newComponent": false
                        }
                    ],
                    "conditions": [],
                    "optimisedIds": [],
                    "newComponent": false
                }
            ],
            "projects": [
                {
                    "projectId": "29100",
                    "projectTypeKey": "software"
                }
            ],
            "labels": [
                11
            ],
            "tags": []
        }
    ],
    "cloud": false
}

1 answer

0 votes
Florian Bonniec
Community Champion
October 29, 2022

Hi @Rai Warbasse 

 

Have you try something like branching on JQL where JQL is "Parent Link" = {{triggeredIssue.Key}} ?

 

Regards 

Suggest an answer

Log in or Sign up to answer