How to use the same workflow but have different resolutions between projects

I have a workflow that many projects user.  I like to re-use workflows.  I brought on a new project and the only minor change that this project needs is for the resolution values to be different.  Currently I control what resolutions a project will see through the resolve transition property jira.field.resolution.include

This particular workflow lists 4 resolutions.  The new project I am creating only needs 3 of those 4 resolutions.

I was wondering if there was some means of doing a post function that would either strip out that 4th resolution type or if it could list the resolution types for that one project.

I have done something before on a shared workflow in the create transition with ScriptRunner workflow function - Custom script post-function  that checked what project it was.  if it was a specific project there was a list of users that needed to be added as watcher at creation.  

Is there some means of doing this for the resolution field in the resolve transition?  I realize it is two different things.

Thanks for any advice you have. 

2 answers

1 accepted

0 votes

Not without a bit of code, because it's the same workflow.

What you could do is have two transitions that do the same thing, but

1) Have a condition on one saying "if project 1, allow this transtion", and another saying "if project 2, allow this transition"

2) Use different jira.field.resolution.include(s) on the transitions

That seemed like a totally evil thing to do but now that I implemented your suggestion it is pretty slick.  I just needed to make sure the name of my transition was evident that it was moving the issue to resolved.

Excellent suggestion!  Thank you for your help!

0 votes
Steven Behnke Community Champion Aug 05, 2017

If you have Adaptavist Scriptrunner for JIRA Server, you can use a Behavior to accomplish this with very little coding. 

This article on the documentation covers the exact scenario: https://scriptrunner.adaptavist.com/latest/jira/recipes/behaviours/restricting-priority-and-resolution.html

(Nic why am I always plugging service desk on your posts ;0 )

Scriptrunner is a good solution for a lot of things :-)  That's why Adaptavist chased Jamie for so long!

Suggest an answer

Log in or Join to answer
Community showcase
Teodora [Botron]
Published Thursday in Marketplace Apps

Jira Inferno: The Nine Circles of Jira Administration Hell

If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...

285 views 0 12
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot