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.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 )
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Scriptrunner is a good solution for a lot of things :-) That's why Adaptavist chased Jamie for so long!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.