It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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

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

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.

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.

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.

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.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira

Jira Cloud for Google Sheets: Automatically Refresh Your Data!

Remember that time you realized it was possible to refresh your Jira data in Google sheets with just one click? What if we told you that you can now get the latest data with no clicks at all?! Zero! ...

268 views 3 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you