Keeping Epics Up To Date Automatically
Epics, like all Jira issues, are based around a workflow, but keeping statuses up to date can be a real chore, resulting in Epics left in their start status even when all child issues have been completed.
Epics are really useful for grouping Stories together, as well as for planning and prioritising work. Like all Jira issues they are based around a workflow, so you can see which Epics haven’t been started, which are being worked on and which have been completed. However keeping Epic workflow statuses up to date can be a chore, so often Epics are left in their start status even if all child issues have been completed. This tip shows you a configuration for automatically keeping the Epic status up to date depending on the progress of linked issues.
Out of the box Jira doesn’t have the capability of doing what I’m going to show you, so you will need a Marketplace App. For this example, I am going to use JSU Automation Suite for Jira, but you can use Misc Workflow Extensions (JMWE), or Automation for Jira instead.
Epics are going to need their own workflow for this solution, create a workflow similar to the one shown below, and remember to associate the workflow with the Epic Issue type in the Workflow Scheme.
Below is a simple Issue workflow, the two transitions that are important are the transition to “we’ve started working on this issue” status, and the “we’ve finished here” status. I’ve marked these with numbers, and for both of these Transitions, we will add a Post Function.
What are Post Functions?
Post functions are automations that are fired after a transition has been successfully completed, they are often used to set values, assign issues or even create new issues.
1. To In-Progress Transition.
We need to add a post function to this transition, click on the Post functions link, followed by Add Post Function. A screen will be displayed, giving us the choice of which Post Function to use.
Choose the Linked Transition (JSU) Post Function, this useful function will Transition the Epic for us.
We need to fill in some details on the Post Function form:
Needs to be set to Epic (Issue in Transition must be in Epic).
Choose the Epic Workflow in the first drop-down, then choose the name of the Transition that moves the Epic into an ‘In Progress’ status.
2. To Done Transition.
Click on the to Done Transition, marked by (2) in the diagram, add a Post Function, and choose Linked Transition (JSU) once again.
Needs to be set to Epic (Issue in Transition must be in Epic)
Choose the Epic Workflow in the first drop-down, then choose the name of the Transition that moves the Epic into ‘Done’ status.
All Other Siblings
If an Epic is linked to multiple Stories we don’t want to complete the Epic just because one Story has finished, we want them ALL to be Done. Setting this field to Done (or whatever your finished status is) checks that all the related child tickets are in the correct status before the transition is fired.
Note: If you have a rejected status as well, you need to make sure that both Rejected and Done are selected in the list of statuses.
Don’t forget to publish the workflow, then you can test that the automations work correctly. Creating an Epic and a couple of linked Stories. Move one of the Stories into In Progress, and watch the Epic magically move into In Progress. Move both the Stories to Done and check that the Epic also moves to Done — viola!
Atlasssian expert resources
Visit our blog for expert news and articles from the Atlassian world. On our resources page you will find recorded webinars, white papers, podcasts, videos and more.
The Software Blog
Read our blog for articles offering best practice advice written by Atlassian experts, as well as the latest news concerning your software.
Software White Papers and Guides
Dive deep into Atlassian software with our white papers and guides on individual tools, partner products, services, and best practices, written by the experts.
All of our webinars are pre-recorded and available to watch on-demand. Enjoy everything from partner features to application demos and updates from Atlassian experts.