I want to be able to transition an Epic when one of it's child issues transitions to the next state in a workflow. For example Epic and children are in ToDo state and one of the child issues is moved to In Progress. This would trigger the Epic to move to In Progress also regardless of the state of the other children. However, when a child moves to Done the Epic will not transition until all of the child issues have transitioned to Done first. (I think I can just reuse this piece for the Done transition:
{% set stories = issue | epic | stories %}
{% set trigger = true %}
{% for story in stories %}
{% if story.fields.status.name != "Done" %}
{% set trigger = false %}
{% endif %}
{% endfor %}
{{ trigger }}
(Please tell me if I'm wrong in that assumption...)
I'm not a programmer so if someone could just provide a Nunjuck code snipet I could paste into the post-function it would be greatly appreciated.
I believe that's exactly the conditional execution code you need for the transition linked issues post-function. Just make sure you also add a delay (~2 seconds) to the configuration so that the current story's status is up to date.
The script I included handles the Epic transition if ALL child issues have moved to "Done". But what about the first part of my question which is to transition the parent Epic when the first child issues transitions to "In Progress"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For that, you also use a Transition Linked Issues post-function, without any conditional execution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.