Forums

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

Hiding field using behaviour

neeta jain
October 9, 2020

Hi Team,

I want hide a text field depending on the value of select list field. written a below script but not getting expected output.

Can you please check and let me know where I am wrong:

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.security.roles.ProjectRoleManager

def textField = getFieldById("customfield_22695")
def selectList = getFieldById("customfield_22694")

def selectListValue = selectList.getValue()

if (selectListValue == "None")
{
textField.setHidden(true)
}
else
{
textField.setHidden(false)
}

2 answers

Suggest an answer

Log in or Sign up to answer
0 votes
Alexey Matveev
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.
November 18, 2017

Try to pass 3 parameters as it is in the documentation

issueFunction in issueFieldMatch("","summary","|(FLDI)|$") 

TAGS
AUG Leaders

Atlassian Community Events