Is there a way to modify this recommendation that explains how to set up the transition to change a radio button?
https://community.atlassian.com/t5/Jira-Software-questions/Change-Radio-Button-Value-on-transition/qaq-p/1337118
I would like it to change only if the radio button is in a specific selection.
If None, do nothing
If Yes, do nothing.
If No, change to yes.
Currently, it changes regardless of the original setting. I'm looking to add a modifier to change ONLY if no is selected.
Thanks!
Hi Renee,
You are probably going to need an add-on like JMWE or ScriptRunner to be able to do that. I know you can with JMWE as we use that.
I have JMWE. Is there a page you can reference that can show me how to do that?
You should be able to just add a Condition to the Post Function that updates radio button. Do you already have a post function that updates the radio button?
I do. I can't figure out what to put in the conditional area to make it change only when no is selected. My fields are the system field None, Yes and No.
If None or Yes I want it to do nothing. If No is selected, I want it to change to yes.
Use the Issue Fields dropdown list provided in the Condition section.
Search for your radio button field and select it
It will show you several examples of code to use.
Under Testing the field's value, you probably want to use what's in the first example. Something like:
issue.fields.customfield_17003.value == "A value"
Click on the example and it will automatically insert the code for you. Then change "A value" to "No"
issue.fields.customfield_17003.value == "No"
Be sure to test it with a couple of issues that currently have the values. You should see True for those with No and False for Yes or None issues.
It looks like you're new here. Sign in or register to get started.