Automatically marking an Epic as "Done" in the backlog when the Issue is done? Edited

Currently, when we are done with an Epic issue, we want to mark both the Issue itself and the instance in our backlog as "Done". I'm in charge of automating this, where marking the Issue page as "Done" automatically removes it from the backlog.

We have a few scripts, in Python, running off webhooks on another server. I was planning on setting up another webhook in the Epic's workflow transitions, but after looking around in the Jira-Python API documentation, I couldn't find anything that could manipulate the backlog. Is there another way to automate this process?

2 answers

1 accepted

Accepted Answer
1 vote
Steven Behnke Community Champion Aug 07, 2017

The Issue Workflow likely has a "Closed" status, something like that. Marking a Epic as "Done" on the backlog is done by setting the field Epic Status to "Done". 

You just need to make sure that you update the Epic Status customfield to DONE when moving to CLOSED and that you move it back to TO DO when you reopen the ticket.

I hadn't realized that "Status" and "Epic Status" were two different fields. Thank you!

Edit: Apparently, this entire job can be done through adding a transition in the workflow to edit that custom field as well.

Steven Behnke Community Champion Aug 09, 2017

No problem. 

This does leave a hole though. It's possible to open and close the epic status field with the workflow, but if someone marks and epic as Done via the board, the issue status won't update automatically. 

You could add a listen to handle this case. 

A team member had just asked about this. Are the options for setting up a webhook on a backlog transition somewhere in the Settings? I can't seem to find them.

It's unclear to me if you're using JIRA Cloud or JIRA Server. Do you have the Scriptrunner plugin or are you using python-jira externally?

I'm using python-jira externally (hosted on DigitalOcean). The server has Flask listening for requests.

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
Posted Sep 18, 2018 in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

25,427 views 2 7
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you