How to transition issue if radio button field has certain value?

Hello,

I'm looking for a way to transition an issue from Resolved to Closed, only when a required custom field with radio buttons has a certain value (and maybe some other conditions). I don't see that possible in JIRA. 

I've tried the free plugin Workflow Enhancer for JIRA, but it doesn't work. I guess because of the boolean-option vs radio buttons wink

And I've tried the free trial of the plugin Enhancer Plugin for JIRA but that has conditions that are not even close to what I want...

So... any ideas on other options or plugins? 

2 answers

1 accepted

1 vote
Accepted answer
Joseph Pitt Community Champion Oct 06, 2015

I'm not familiar with that plugin. I use the JIRA suite utilities. It allows checking the value of a custom field as a condition for the transition. I've never tried to test for radio buttons. I normally use select lists for options. Check it out at https://marketplace.atlassian.com/plugins/com.googlecode.jira-suite-utilities

Could you do a quick check perhaps for me?

Ok, I was toooo curious so I installed it. And tried it. And enjoyed it! It does what I need: get every field a certain value to transition (or not, or bigger/smaller). Thank you!

Script Runner http://www.adaptavist.com/w/products-plugins/adaptavist-scriptrunner/scriptrunner-for-jira/

 

Two possibilities come to mind: either use a condition script or validator script.

  • Condition script can hide the Resolved->Closed transition if the radio button isn't set correctly.
  • Validator script can pop up an error message and prevent the transition from Resolved->Closed if the radio button isn't set correctly.

 

There are some built-in scripts and you can also create completely custom scripts. You can add in as many checks & conditions as you want if you need to check for other things as well.

 

There are probably other ways to accomplish this w/ Script Runner as well. Very easy to learn, flexible, and powerful. You should install the trial version and try it out. You might also be able to install an older (still very useful) version and continue use for free.

 

Hope it helps.

Hi Andrew, Thank you for your quick answer. I've already installed Scriptrunner a while ago, but never used it besides the built-in scripts. Your second option is actually the one we really want, never thought it could do something like that. Looks exciting but hard to learn, do you have any tips for learning?

I'd start by reading through the documentation here: https://scriptrunner.adaptavist.com/latest/jira/quickstart.html. Then I'd go over https://scriptrunner.adaptavist.com/latest/jira/custom-workflow-functions.html#_validators a few times. These scripts can be done directly in a console in JIRA so they're very easy to get up and running. Copy one of the examples, get that to work, and then move on to creating your own. If you have trouble writing the script then create another post on the forums and people will help out.

Suggest an answer

Log in or Sign up to answer
Community showcase
Asked Thursday in Jira Ops

I'm John Allspaw, Ask Me Anything about incident analysis and postmortems

I'm John Allspaw, co-founder of   Adaptive Capacity Labs, where we help teams use their incidents to learn and improve. We bring research-driven methods and approaches to drive effective inciden...

4,263 views 20 12
View question

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