Best way to avoid duplicate workflows?

Hi, I'd like to set up a groovy script or something similar to avoid having two workflows that do the same thing except one presents one set of resolution fields versus the other. 

In a nutshell, I'd like to create a separate list of resolution options depending upon the issue type without having to manage two very similar workflows.

I am able to accomplish this today with the pain of the two similar workflows:

image2017-3-8 11:47:0.png


Can this be done with a groovy script instead?

1 answer

1 accepted

3 votes
Accepted answer

Hi Kevin Bushman

You can achieve what you want very easily with the standard JIRA workflow functionality. No need to write groovy script or anything. The key aspect you need to know is the property on resolution during a transition. Full details of the available properties are here

So to solve your problem you have two transition routes (one for each set of issue types which would be defined in the condition) to closure each of which has the property 


set with the appropriate list of IDs for the resolutions you wish to be available. 

One thing to watch out for is if you add a new resolution at any point in the future you will need to add it to the workflow property as well.

Nice! This sounds like exactly what I am looking for. But I'm trying to understand what you mean.

My current implementation the is using property


however I am confused on what you mean by having two transition routes. I could add two transitions but I'm not clear on how to map those to specific issue types.

Edit: To add to my solution, this page solved my problem but causing me to have to maintain two nearly identical workflows.

@Kevin Bushman

Here is an example of two routes between statuses which are available for different conditions.

image2017-3-16 12:31:19.png

Here I have two different transitions to Done from In Progress one which would offer the resolutions associated with the work being completed and the second which would be used for a cancelled request. On the cancelled request we can use a post-function to update the resolution to Cancelled automatically. Whereas on the Completed we can offer the subset of resolutions in the transition screen to allow the user to select. 

Now to extend this model and only allow certain issuetypes to see a specific transition we use the Condition on the transition and for this you need to use a plugin such as Adaptavist Scriptrunner for JIRA to identify those issues of a certain issuetype. 

So in Scriptrunner you would use the scripted condition == "New Feature"


You would replace the reference to "New Feature" with the name of the issuetype you want to use the transition for.


Got it! This is exactly what I needed. Thank you. Unfortunately, it makes my workflows look a little more messy but It's not a big deal. (We have many routes to Resolution)

If you have many routes to Resolution then I would look at using shared transitions to see if I could reduce some of the duplication and in particularly whether you could use a transition screen or some logic to determine the resolution automatically.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,076 views 4 9
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