How to automatically update an epic's issue status in line with the epic status

Nicola Barton February 1, 2016

I'm a JIRA Agile Cloud user. I want to be able to link the epic status field to its issue field.  

There are 2 potential ways I'd like to do this:

  1. A user marks the Epic status as 'Done' in the backlog Epic panel. At this point, I'd like the epic's issue status to be changed to 'Done' and for it to be resolved.
  2. Link the epic status to the status of its child issues. So, if all child issues are 'To Do', the epic is also 'To Do'. If any child issue is changes to 'In Progress', the epic status and epic issue status is changes to 'In Progress'. If all issues are 'Done', the epic and issue status is done and also resolved.

I realise I might need a plugin to achieve either of these but would appreciate ideas on how I can achieve either.

Thanks

1 answer

1 vote
Steve Behnke [DiscoverEquip.com]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 1, 2016

Great question.

In JIRA for Server – Workflow automation and custom listener work

Typically, you'd perform this work as custom work and install as add-ons into the product.

  1. Use the Issue Workflow to control the Epic Status field via post-functions
  2. Use a Listener to watch for changes to Epic Status field on Issue Updated events and react by firing Transitions on the Issue Workflow
  3. Use a Listener to watch for changes to Epic Link field on Issue Updated events and react by firing Transitions on the issue workflow

 

In JIRA Cloud – Workflow automation and webhook/API work via 3rd party service

Requires you to pay or run a custom service independent of JIRA

  1. Use the Issue Workflow to control the Epic Status field via post-functions
  2. Configure webhooks to send data to your own service
  3. Use your remote service to consume webhooks and translate the data
  4. Use your remote service to fire calls to JIRA's API
    1. Watch for changes to Epic Status field on Issue Updated events and react by firing Transitions on the Issue Workflow
    2. Watch for changes to Epic Link field on Issue Updated events and react by firing Transitions on the Issue Workflow
Nicola Barton February 2, 2016

Thanks @Steve Behnke [DiscoverEquip.com] for your response.

I'm a Cloud user so the Server part wouldn't work for me.

In the JIRA Cloud section, unfortunately #1 isn't possible. It will only allow you to update specific issue fields and the Epic Status is not one of them. The remaining points re webhooks and APIs are beyond my current knowledge and skillset.

Ideally, I'm looking for a solution within Jira, or a plug-in to achieve this.

Steve Behnke [DiscoverEquip.com]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 2, 2016

Yes, the JIRA default post-function of Update Issue Field won't help you. However, Misc Workflow Extensions includes a post-function called Update Issue Custom Field. This will let you set Epic Status from a Workflow Post-function.

This add-on is pre-installed in your JIRA Cloud instance but it is disabled by default! Since these are free and installed by default, I'd enable Misc Workflow Extensions, JIRA Suite Utilities, and JIRA Toolkit if you haven't already.

This will give you part of your use-case, since you'll be able to control the Epic Status field from the workflow.

 

If you wanted to do this on JIRA Server, you'd need to use write a custom listener (in JAVA) or leverage the JIRA Automation Plugin to set up a custom listener. Perhaps a GROOVY function through ScriptRunner. You can't do any of these in this case, which leaves Webhooks/REST API to perform this operation.

There are no alternatives nor do I know of any add-ons that meet your criteria. For the record, the script you'd need to host is simple, anyone with scripting expertise at your work should be able to provide a hand. Please check this out – https://answers.atlassian.com/questions/71266. If this isn't a possibility for you then you should reach out for expert services.

Glenn Verrijkt May 8, 2017

Just adding a bit of info:

The JIRA Misc Workflow Extensions add-on is no longer free (both for JIRA Server and Cloud) and it does not come pre-installed anymore on JIRA Cloud.

More details available on the Marketplace.

maichriedler August 21, 2018

I've written a small service that transitions Epics automatically if the status of linked stories is updated. It can be easily integrated into JIRA.

The source code is open source on GitHub here. I've also described in a blog post how it works here.

Like Yogesh Mude likes this

Suggest an answer

Log in or Sign up to answer