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
Accepted answer

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 Sign up to answer
Community showcase
Posted Mar 28, 2018 in Jira Software

Can a company’s culture make or break agile adoption?

Can a new-to-agile team survive and thrive in a non-agile culture? If so, what advice would you give to those trying to be agile in a non-agile culture? What's the key(s) to success? Share your thoug...

17,626 views 18 20
Join discussion

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