Automation rule | Copy the field value from an issue of type Initiative to an Epic issue of a different project

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

Summary

This knowledge-based article provides guidance on how to create an automation rule in order to copy a field value from one project issue to another. The example provided for illustration uses certain issue types and field names, but you can adjust them according to your specific needs.

Example considered in this article: When an issue of type 'Initiative' (belonging to Project B) is chosen in the 'Parent link' field of an 'Epic issue (belonging to Project A), copy the value of the 'Test' custom field (if it is not blank) from the Initiative to the Epic issue.

Solution

Here is one way to set up this automation rule:

Trigger: Field value changed - Parent Link Condition: Issue fields condition: Project = A Branch rule / related issues: Type of related issue: Epic( parents) Issue fields condition: Project = B Issue fields condition: Test (custom field name) is not empty Add action: Edit issue: Copy "Test" from Parent

Here is the JSON file for the automation rule configuration:

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 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 { "cloud": true, "rules": [ { "id": 15254897, "clientKey": "fcb18f79-08d6-35bd-9c47-b1e204f45645", "name": "Copy BRAND(CRM) from CRM TO MAR", "state": "DISABLED", "description": "", "authorAccountId": "6362284b01c2ff842c19db70", "actor": { "type": "ACCOUNT_ID", "value": "557058:f58131cb-b67d-43c7-b30d-6b58d40bd077" }, "created": 1696912213613, "updated": 1696912737927, "trigger": { "id": "333515186", "component": "TRIGGER", "parentId": null, "conditionParentId": null, "schemaVersion": 2, "type": "jira.issue.field.changed", "value": { "changeType": "ANY_CHANGE", "fields": [ { "value": "Parent Link", "type": "fieldName" } ], "actions": [] }, "children": [], "conditions": [], "connectionId": null }, "components": [ { "id": "333515187", "component": "CONDITION", "parentId": null, "conditionParentId": null, "schemaVersion": 3, "type": "jira.issue.condition", "value": { "selectedField": { "type": "ID", "value": "project" }, "selectedFieldType": "project", "comparison": "EQUALS", "compareValue": { "type": "ID", "modifier": null, "value": "10040", "multiValue": false, "source": null } }, "children": [], "conditions": [], "connectionId": null }, { "id": "333515188", "component": "CONDITION", "parentId": null, "conditionParentId": null, "schemaVersion": 3, "type": "jira.issue.condition", "value": { "selectedField": { "type": "NAME", "value": "Brand (MAR)" }, "selectedFieldType": "com.atlassian.jira.plugin.system.customfieldtypes:select", "comparison": "EMPTY", "compareValue": null }, "children": [], "conditions": [], "connectionId": null }, { "id": "333515189", "component": "BRANCH", "parentId": null, "conditionParentId": null, "schemaVersion": 1, "type": "jira.issue.related", "value": { "relatedType": "epic", "jql": "", "linkTypes": [], "onlyUpdatedIssues": false, "similarityLimit": 40, "compareValue": 0 }, "children": [ { "id": "333515190", "component": "CONDITION", "parentId": "333515189", "conditionParentId": null, "schemaVersion": 3, "type": "jira.issue.condition", "value": { "selectedField": { "type": "ID", "value": "project" }, "selectedFieldType": "project", "comparison": "EQUALS", "compareValue": { "type": "ID", "modifier": null, "value": "10015", "multiValue": false, "source": null } }, "children": [], "conditions": [], "connectionId": null }, { "id": "333515191", "component": "CONDITION", "parentId": "333515189", "conditionParentId": null, "schemaVersion": 3, "type": "jira.issue.condition", "value": { "selectedField": { "type": "NAME", "value": "Brand (MAR)" }, "selectedFieldType": "com.atlassian.jira.plugin.system.customfieldtypes:select", "comparison": "NOT_EMPTY", "compareValue": null }, "children": [], "conditions": [], "connectionId": null } ], "conditions": [], "connectionId": null }, { "id": "333515192", "component": "ACTION", "parentId": null, "conditionParentId": null, "schemaVersion": 10, "type": "jira.issue.edit", "value": { "operations": [ { "field": { "type": "NAME", "value": "Brand (MAR)" }, "fieldType": "com.atlassian.jira.plugin.system.customfieldtypes:select", "type": "COPY", "value": { "copyOptions": [], "sourceIssue": "parent", "sourceField": { "type": "NAME", "value": "Brand (MAR)", "fieldType": "com.atlassian.jira.plugin.system.customfieldtypes:select" } } } ], "advancedFields": null, "sendNotifications": true }, "children": [], "conditions": [], "connectionId": null } ], "canOtherRuleTrigger": false, "notifyOnError": "FIRSTERROR", "projects": [], "labels": [], "tags": [ { "id": 45243890, "tagType": "IS_RULE_UPDATED", "tagValue": "true" } ], "ruleScope": { "resources": [ "ari:cloud:jira:7bbd0f61-9cf7-46a8-a02c-5d635b174db8:project/10015" ] }, "ruleHome": { "ruleLifeCycleHome": { "locationARI": "ari:cloud:jira:7bbd0f61-9cf7-46a8-a02c-5d635b174db8:project/10015" }, "ruleBillingHome": { "locationARI": "ari:cloud:jira-software::site/7bbd0f61-9cf7-46a8-a02c-5d635b174db8" } }, "writeAccessType": "UNRESTRICTED", "collaborators": [], "billingType": "NORMAL" } ] }

Note: The field name/project name might be different in the JSON file, please modify the rule upon importing and confirm the working behaviour it on a test project.

Updated on May 31, 2024

Still need help?

The Atlassian Community is here for you.