Looking for a simple ScriptRunner Behaviour to make this happen on issue creation. It seems that I'm getting closer, but it's not working. The custom field name is "Request Type" and if the value is "Release Related" it should make the Fix Version field required.
def field1 = getFieldByName("Fix Version/s")
def field2 = getFieldById("customfield_13590")
if(field2.getValue().equals("15121"))
{ field1.setRequired(true) }
else { field1.setRequired(false) }
Hi @Luis Tellado ,
Give it a try with def field1 = getFieldById("fixVersions")
BTW what is the field type of customfield_13590?
It did not work and that is the field id for "Release Related"
Using your suggestion, this works!
def field1 = getFieldById("fixVersions")
def field2 = getFieldByName("Request Type")
if(field2.getValue().equals("Release Related"))
{ field1.setRequired(true) }
else { field1.setRequired(false) }
THANK YOU!
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.