tutorial

Automatically keep epics and stories in sync in Jira

Learn how to create a Jira automation rule that keeps epics and stories in sync with their parent issues.

Kev Zettler Szerző: Kev Zettler
Browse topics

This guide demonstrates how to create a Jira automation rule that keeps epics and stories in sync with their parent issues. This is an example of a Branch rule component that applies actions to related issues, such as sub-tasks. This guide assumes you have an active Jira project.

In the Rules tab, click on the Create rule button at the top right corner of the screen. In our example rule below the Issue Transitioned trigger was selected.

Select a trigger in Jira Software

On the Issue Transitioned screen, select the status trigger to execute a rule, then click save. In the below example the rule to be executed is "DONE".

Find the Issue created trigger from the list of triggers

Next, on the Add Component screen click the New condition option.

Select a new condition in Jira Software

On the New Condition screen select Issue fields condition.

Select Issue fields condition

On the Issue Field Condition screen configure the condition to act on “epic” then click the save button. The configuration should look like the following:

Issue fields condition configuration screen

Once you click the save button you will return to the Add component screen. The next component we will select is the Branch rule / related issues option.

Add branch rule component

On the Branch rule / related issues screen, select the branch rule type of related issues to Stories (or other issues in Epic) and then click the Save button.

Branch rule and related issues screen

This rule will now search if an epic has associated stories and perform actions on these instead of the trigger issue. Next, we will add a component underneath the For Stories branch. Select the New condition option.

Selecting a new component in Jira Software

On the New condition screen, select the Issue fields condition option.

Selecting Issue fields condition

Configure the Issue fields condition so the Status does not equal DONE. This ensures the rule only targets stories underneath an Epic with a status that is not done. The following illustration shows the configuration of the issue fields condition. Once configured, click the Save Button

Configuring Issue Fields Condition in Jira Software

Next, you can add New action to the new issue field condition. Click New Component on the left Rule details sidebar. Select New action on the new component screen.

Selecting new action as a new component in Jira Software

We will use a Transition issue action for the New action. Select the Transition issue action to advance.

Selecting Transition Issue as a New Action

Configure the Transition the issue action to set the destination status from the trigger issue. This sets the story issues status to the parent epic. The transition issue action should look like the illustration below. Click Save to continue.

Selecting Destination Status for Transition Issue in Jira Software

This fully configured the rule. The left sidebar Rule summary should look like the following:

Fully Configured Rule Summary

Now you can add a name to the rule. Below we named the rule “Keep Epics and stories in sync”. Once you enter a name click the Turn it On button.

Naming Your Automation Rule

You can test the rule by going to your board and creating some issues. Create a new Epic issue and then a Story issue as part of the Epic. Change the status of the Epic to Done. Once you run this test exercise you can visit the rules page and check the Audit Log.

Audit Log to test Jira Rule Automation

The audit log will indicate if the rule is completed successfully. You should see a green SUCCESS message. If not, the Audit log will also indicate if there are any errors with the rule and help debug.

Be sure to check out hundreds of other rules in our Automation Template Library.