Why doesn't my story get moved into Done by the epic while the other story does?

I have two workflows that are not interacting the way I expect. (What I'm about to describe is simplified but still shows the problem. Sorry it's so involved but I don't see how to make it any simpler and still do what I need.)

There is a story workflow and an epic workflow. Both workflows have 3 states: Open, In Progress and Done. The automation is intended to implement two rules:

1) When the last linked story moves to In Progress, the Epic moves to In Progress.

2) When the Epic moves to In Progress it moves all the linked stories to Done.

I implemented rule 1) with a post function on the Story transition from Open to In Progress that tries to move the linked Epic from Open to In Progress PLUS by putting a condition on the Epic Transition from Open to In Progress that only allows the transition if all the linked Stories are in In Progress.

I implemented rule 2) by putting a post function on the Epic transition from Open to In Progress that moves all the linked stories to Done.

I tried this with two stories attached to the epic and all 3 issues in Open.

When I move the first story  to In Progress and the Epic doesn't move. (expected behavior)

When I move the 2nd story (which is the last story) to In Progress, the epic moves to In Progress. (expected behavior)

The first story moves to Done. (expected behvior)

The problem is that the 2nd story (the last story to move into In Progress) gets stuck in In Progress and does NOT move to Done. (problem)

 

QUESTION: Why doesn't that 2nd story move to Done? And how do I fix this?

 

I believe this might be a timing issue: the 2nd story hasn't completed it's transition to In Progress before the Epic tries to move it to Done. But I don't know how to fix that...

 

Any suggestions?

 

1 answer

Hi Dave,

As you are using JIRA Workflow Toolbox to implement the described behavior, you should know that the plugin doesn't auto-refresh UI when changes are executed in background.

I think that what might be happening is that your second Story (i.e., the one that triggers all the cascade of transitions) is not been shown in Done status because you need to refresh your browser.

So, please try refreshing your browser after executing the transition of the last Story to In Progress status.

The typical corruption problem that happens (I hope this is not the case), is that the workflow step and issue status don't match. In order to detect this problem you can execute JIRA Integrity Checker, at Administration > System > Integrity Checker.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,533 views 15 21
Read article

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