Is there a way to modify this recommendation that explains how to set up the transition to change a radio button?
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 must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks so much for the tip - this is the final code
issue.get("customfield_17600") == "No"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Glad it worked out for you. I have been seeing the code switch recently to be more inline with what you posted. The folks at JMWE are super to help as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks John for helping out Renee - and for the nice comment about us at Innovalog :)
Just for future reference:
issue.fields.customfield_17003.value == "No"
would be on Jira Cloud, not Server/DC.
David
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.