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 apps 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:
{
"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.
Was this helpful?