I would like to write a script with Script runner that updates the text boxes based on drop-down values.
The drop down has three values - default, X and Y. when the user selects default, no field should be displayed. When the user selects X, the text box corresponding to X should be displayed. Similarly when the user selects Y, the text box corresponding Y should be displayed.
The change should happen before the issue is created. Is there a way to select the fields dynamically..?
Finally got the solution by adding a behaviour on field level and added a server side script.
def CField1= getFieldByName("Field Name 1")
def CField2= getFieldByName("Field Name 2")
def TCType = getFieldById(getFieldChanged())
def selectedOption = TCType .getValue() as String
if(selectedOption=="Status")
{
CField1.setHidden(false)
CField2.setHidden(true)
}
else if (selectedOption=="Results")
{
CField1.setHidden(true)
CField2.setHidden(false)
}
else if (selectedOption==null)
{
CField1.setHidden(true)
CField2.setHidden(true)
}
Hi all
Anyone know how I can just get a script that will create a text box when I select "Other" from my dropdown list?
Really need help here?
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.
Still thinking about joining us for Team '25 Europe? Early bird has been extended for just one week! Now’s the time to lock in your lowest rate. Use code TEU25COMM-20 to save 20% at checkout. Hurry, this only lasts for 1 more week.
Learn more
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.