Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×I'm on JIRA Cloud and I'm looking to transition an epic when all of the linked tasks or stories are complete.
I found something on line but it's not working for me. I'm not sure what I'm doing wrong.
Automatically transition the Epic when all Stories are resolved.
Steps
{% set stories = issue | epic | stories %} {% set trigger = true %} {% for story in stories %} {% if story.fields.status.name != "Resolved" %} {% set trigger = false %} {% endif %} {% endfor %} {{ trigger }} |
Any help with this would be great!
Thanks,
Dale
Hi Dale,
you want to use the "Transition Linked Issues" post-function instead, to transition the parent Epic, not the current issue (Story). The rest seems correct.
David
Thanks Dave. It looks like I've finally got that working.
One more questions, can I do the same thing but from the Epic? Can I add the post function there, on the epic, to resolve the epic when all of it's stories are resolved? My problem is there may be stories under the epic that belong to different projects (hence different workflows).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, can you help how to write this condition for JIRA server not for Cloud?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Here it is:
if(!issue.epic)
return false
linkedIssue.stories.every{it.status.name == "Resolved"}
Regards,
Radhika
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It works! Thank you, so much Radhika!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This comment was based on a since-resolved misunderstanding and was not helpful so I have removed it. Tried to delete it but can't!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Dave. It looks like I've finally got that working.
One more questions, can I do the same thing but from the Epic? Can I add the post function there, on the epic, to resolve the epic when all of it's stories are resolved? My problem is there may be stories under the epic that belong to different projects (hence different workflows).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, for the simple reason that the Epic is not aware of its Stories being transitioned - hence the Transition linked issues post-function on the Story transition.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.