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:
Can this be done with a groovy script instead?
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 https://confluence.atlassian.com/adminjiraserver071/workflow-properties-802592825.html
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. https://answers.atlassian.com/questions/144864
Here is an example of two routes between statuses which are available for different conditions.
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
You would replace the reference to "New Feature" with the name of the issuetype you want to use the transition for.
Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...
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!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot