Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,457,025
Community Members
 
Community Events
176
Community Groups

How to write condition for workflow transition that has linkage between epic and story?

Hi All,

I was setup my Jira to have the following hierarchy:

Portofilo Epic -> Feature Epic -> Story -> Sub-task.

Portofilo Epic is a parent link of Feature Epic,

Feature Epic is a Epic link of the story.

The Feature Epic and Story requires some status relationship. It means that Story can't move to Ready until Feature Epic status is in Ready.

How do I write a condition in the workflow to handle that?  I know I will have to write a JQL Query to do that but I'm not understand enough to write one for it.

Please Help!  Thank you.

1 answer

0 votes

Just to be clear, you want a condition script so that the workflow transition is not visible for Story unless the linked Epic is also in Ready status?

A simple scripted condition should work for this. 

cfValues['Epic Link'].status.name == 'Ready'

Yes, that is correct.  Or it could error out and stop the story to move to forward state. how of I add OR statement to it?
Epic Link status equal Ready or Implement then story can move to Ready

I think your scripted condition above should work for me in that 1 case.


Thank you

When I have multiple clauses I like to separate them like this:

//if you need to compare a singel value against a list you can use the "in" operator in groovy
def okStatusList = ['Ready', 'Implement']
def parentStatusIsOk = cfValues['Epic Link'].status.name in okStatusList
def otherCriteria = <expression that returns a true or false>

//evaluate the criteria if both must be true
parentStatusIsOk && otherCriteria

//evalue the criteria is either must be true
parentStatusIsOk || otherCriteria

If you want to display the button and provide a visual warning for the user, then put the same script in a simple scripted validator instead. Otherwise, the user may not understand why sometimes the button is visible and not other times.

Thank you.  That would do it.  I will try it out.

@Peter-Dave Sheehan- Thank you so much, it works exactly as what I expected and yes, I put it in the validator so that end-users get the popup message tell them what to do.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events