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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Can I use Power Scripts to create an "If\Then" statement to determine an issue's workflow?

I am trying figure out if I can add an .sil condition to the "create" transition in my workflow where, depending on the value of a particular field, it either goes down "Path 1" or "Path 2" of the workflow.  To give a little more context, I'm aware that you can't create custom epics in Jira, so Im basically trying to create 2 workflows in 1 issue type.

Ex.  EPIC-123 has a field called "Epic Type" (drop down, single-choice field) 

IF EPIC-123, Epic Type = "Type A" THEN Status = "Ready For Review" 

IF EPIC-123, Epic Type = "Type B"  THEN Status = "To-Do" 


Something to that effect.  the "Type B" in this scenario is a super simple "To Do, In Progress, Done" that a lot of users don't want modified. But the "Type A" Epic, has a very specific and very different set of steps and validations. 

All this being said, I am open to alternative ideas. I went through a lengthy process of creating an additional issue type, setting up notification schemes, workflow post-functions etc. only to then find out, that I can't leverage Parent Link the same way actual Epics do. Also, can't use epic links, colors, etc. So this .sil script is my Plan B. 

1 answer

0 votes

Hello @Danny Davidson ,

I would create a workflow, which would include all necessary statuses for Type A or Type B and then use workflow conditions to show required statuses.

For example,

Let's say you have a status named Open. Then for Epic Type A you need to go from Open to Under Review and for Epic Type B you need to go from Open to To Do.

You create the following workflow:

Screenshot 2020-07-22 at 11.50.14.pngThen you add the following scripts to To Do and Under Review transitions:

To Do:

if #{Epic Type} == "Type A" {
return true;
return false;

Under Review:

if #{Epic Type} == "Type B" {
return true;
return false;

 As a result if an epic of Type A is in the Open status then only To Do transition will be available. If an epic of Type B is in the Open status then only the Under Review transition will be available.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Agile

Master the art of thinking big, working small: A conversation with John Cutler

Hello all! It has been 20 years since the agile manifesto was introduced, and closer to 40 years since software development began moving away from a waterfall-type approach. While many teams have ...

1,473 views 11 28
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you