Automation rule| Sum a custom field number value from all linked issue to the Story Points fields on Linked issue

Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.

Summary

This article will help with an automation rule for summing up a custom field number value from all linked issues to the Story Points fields on the Linked issue

Scenario:

Issue ADTR-12 and ADTR-24 are linked to ADTR-2 with the issue link type "is parent of", If the custom field named "Efforts(M/D)" Number field type updated on ADTR-12 and ADTR-24, then the Story Points field should be updated on ADTR-2

Issue and its linked issue screenshot

Solution

Trigger: When field updated: "Efforts(M/D)"

Related issues condition: Link type: "is child of" present

Sum the "total efforts" field value from linked issues to the story points field on Parent automation rule

Branch rule / related issues: Link types: "is parent of"

Sum the "total efforts" field value from linked issues to the story points field on Parent automation rule

Lookup issues: JQL: issue in linkedIssues({{issue.key}})

Sum the "total efforts" field value from linked issues to the story points field on Parent automation rule

Edit issue: {{lookupIssues.Efforts(M/D).sum}}

Sum the "total efforts" field value from linked issues to the story points field on Parent automation rule

Please feel free to import the JSON file for the given automation rule:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 { "cloud": true, "rules": [ { "id": 16023785, "clientKey": "jira:049027c3-a93f-431c-80f2-36bb562f6f76", "name": "Sum the \"Total Efforts\" field value from Link issues to the \"Story Points\" fields on Parent ", "state": "ENABLED", "description": "", "authorAccountId": "557058:ebcac9a8-12bb-4688-8ac2-6c2e3f0e7d16", "actor": { "type": "ACCOUNT_ID", "value": "557058:f58131cb-b67d-43c7-b30d-6b58d40bd077" }, "created": 1699253587071, "updated": 1699457409781, "trigger": { "id": "351482898", "component": "TRIGGER", "parentId": null, "conditionParentId": null, "schemaVersion": 2, "type": "jira.issue.field.changed", "value": { "changeType": "ANY_CHANGE", "fields": [ { "value": "Efforts(M/D)", "type": "fieldName" } ], "actions": [] }, "children": [], "conditions": [], "connectionId": null }, "components": [ { "id": "351482899", "component": "CONDITION", "parentId": null, "conditionParentId": null, "schemaVersion": 1, "type": "jira.issues.related.condition", "value": { "relatedType": "linked", "linkTypes": [], "operator": "present", "relatedJql": "", "compareJql": "", "compareValue": 0, "similarityLimit": 40, "jql": "" }, "children": [], "conditions": [], "connectionId": null }, { "id": "351482900", "component": "BRANCH", "parentId": null, "conditionParentId": null, "schemaVersion": 1, "type": "jira.issue.related", "value": { "relatedType": "linked", "jql": "key={{Issue.Parent Link}}", "linkTypes": [], "onlyUpdatedIssues": false, "similarityLimit": 40, "compareValue": 0 }, "children": [ { "id": "351482901", "component": "ACTION", "parentId": "351482900", "conditionParentId": null, "schemaVersion": 1, "type": "jira.lookup.issues", "value": { "id": "_customsmartvalue_id_1699453762167", "name": { "type": "FREE", "value": "lookupIssues" }, "type": "JQL", "query": { "type": "SMART", "value": "issue in linkedIssues({{issue.key}})" }, "lazy": false }, "children": [], "conditions": [], "connectionId": null }, { "id": "351482902", "component": "ACTION", "parentId": "351482900", "conditionParentId": null, "schemaVersion": 10, "type": "jira.issue.edit", "value": { "operations": [ { "field": { "type": "NAME", "value": "Story Points" }, "fieldType": "com.atlassian.jira.plugin.system.customfieldtypes:float", "type": "SET", "value": "{{lookupIssues.Efforts(M/D).sum}}" } ], "advancedFields": "", "sendNotifications": true }, "children": [], "conditions": [], "connectionId": null }, { "id": "351482903", "component": "ACTION", "parentId": "351482900", "conditionParentId": null, "schemaVersion": 1, "type": "codebarrel.action.log", "value": "{{lookupIssues.Efforts(M/D).sum}}", "children": [], "conditions": [], "connectionId": null } ], "conditions": [], "connectionId": null } ], "canOtherRuleTrigger": false, "notifyOnError": "FIRSTERROR", "projects": [], "labels": [], "tags": [ { "id": 49220464, "tagType": "IS_RULE_UPDATED", "tagValue": "true" } ], "ruleScope": { "resources": [ "ari:cloud:jira:29cac108-4849-4658-90bb-6eec99094fcf:project/10427" ] }, "ruleHome": { "ruleLifecycleHome": { "locationARI": "ari:cloud:jira:29cac108-4849-4658-90bb-6eec99094fcf:project/10427" }, "ruleBillingHome": { "locationARI": "ari:cloud:jira-software::site/29cac108-4849-4658-90bb-6eec99094fcf" } }, "writeAccessType": "UNRESTRICTED", "collaborators": [], "billingType": "NORMAL" } ] }

Updated on May 31, 2024

Still need help?

The Atlassian Community is here for you.