Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to show/disable fields based on select list value through behavior?

Teja
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
July 3, 2018

Hi,

I am trying to enable some fields when Roadmap Item = Tactical [single select type] else the fields will be disabled. Can someone help me and i tried below code doesn't seem working. 

def dropDown = getFieldById("customfield_15200")
if (dropDown.getValue() == "Tactical") {

def ccgroup = getFieldByName("Name")
def ccgroup1 = getFieldByName("Solution")
def ccgroup2 = getFieldByName("Theme/s") //Group
def ccgroup3 = getFieldByName("Driver Category")

ccgroup.setReadOnly(false)
ccgroup1.setReadOnly(false)
ccgroup2.setReadOnly(false)
ccgroup3.setReadOnly(false)
}

 Thanks

Teju Naik

1 answer

1 accepted

Suggest an answer

Log in or Sign up to answer
0 votes
Answer accepted
João Filipe Silva
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 20, 2021

solved by using this script on both urgency and imapct fields, instead of priority field.

Chris
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
July 7, 2022

Hi @João Filipe Silva

I am struggling with the same issue. Could you elaborate a bit on how you "used the script on both urgency and impact fields"? Is this a scriptrunner listener? Or do I need to set a "custom script field"?

your help is very much appreciated.

Chris

TAGS
AUG Leaders

Atlassian Community Events