Automation rule|Update some fields values from Story issue to Epic issue when the Epic link is added to the Story Issue

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

Summary

This article will help with an approach to cater for the use case via the Automation rule: Update/copy some field values from the Story issue to the Epic issue when the Epic link is added to the Story issue.

Solution

One approach to configuring the Automation rule for this requirement can be

Automation Rule

  • Trigger: When issue updated

  • Condition : IssueType: Story(you can choose any issue Type that you desire)

  • Advanced compare condition:

    • First value : {{issue.epic link}}

    • Condition : does not equal

    • Second value: empty(keep it empty )

  • Branch condition: For Epic(Parent)

    • Edit action: Select the desired fields choose the Copy option from three dots > Copy field from Trigger issue

Below is the JSOn output of automation rule:

1 {"cloud":true,"rules":[{"id":14537631,"clientKey":"fcb18f79-08d6-35bd-9c47-b1e204f45645","name":"Check epic link when field updated","state":"ENABLED","description":"","authorAccountId":"6362284b01c2ff842c19db70","actor":{"type":"ACCOUNT_ID","value":"557058:f58131cb-b67d-43c7-b30d-6b58d40bd077"},"created":1693306718792,"updated":1693307483644,"trigger":{"id":"313050345","component":"TRIGGER","parentId":null,"conditionParentId":null,"schemaVersion":1,"type":"jira.issue.event.trigger:updated","value":{"eventKey":"jira:issue_updated","issueEvent":"issue_updated"},"children":[],"conditions":[],"connectionId":null},"components":[{"id":"313050346","component":"CONDITION","parentId":null,"conditionParentId":null,"schemaVersion":3,"type":"jira.issue.condition","value":{"selectedField":{"type":"ID","value":"issuetype"},"selectedFieldType":"issuetype","comparison":"EQUALS","compareValue":{"type":"ID","modifier":null,"value":"10001","multiValue":false,"source":null}},"children":[],"conditions":[],"connectionId":null},{"id":"313050348","component":"ACTION","parentId":null,"conditionParentId":null,"schemaVersion":1,"type":"codebarrel.action.log","value":"Epic: {{issue.epic link}}","children":[],"conditions":[],"connectionId":null},{"id":"313050350","component":"CONDITION","parentId":null,"conditionParentId":null,"schemaVersion":1,"type":"jira.comparator.condition","value":{"first":"{{issue.epic link}}","second":"","operator":"NOT_EQUALS"},"children":[],"conditions":[],"connectionId":null},{"id":"313050352","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":"313050353","component":"ACTION","parentId":"313050352","conditionParentId":null,"schemaVersion":10,"type":"jira.issue.edit","value":{"operations":[{"field":{"type":"ID","value":"labels"},"fieldType":"labels","type":"COPY","value":{"copyOptions":[],"sourceIssue":"trigger","sourceField":{"type":"ID","value":"labels","fieldType":"labels"}}}],"advancedFields":null,"sendNotifications":true},"children":[],"conditions":[],"connectionId":null}],"conditions":[],"connectionId":null}],"canOtherRuleTrigger":false,"notifyOnError":"FIRSTERROR","projects":[],"labels":[],"tags":[{"id":41786882,"tagType":"IS_RULE_UPDATED","tagValue":"true"}],"ruleScope":{"resources":["ari:cloud:jira::site/7bbd0f61-9cf7-46a8-a02c-5d635b174db8"]},"ruleHome":{"ruleLif

NOTE

Copy the above JSON code in a file and save it as .json. Import it in JIRA to import the above rule.

Automation Rule - Update some fields values from Story issue to Epic issue when the Epic link is added to the Story Issue

Here is the document to refer to for assistance with importing automation rules: https://support.atlassian.com/cloud-automation/docs/import-and-export-jira-automation-rules/

Updated on May 31, 2024

Still need help?

The Atlassian Community is here for you.