I am doing field behaviors using scriptRunner and hit some sort of challenging problem.
The requirement is that when the user selected "VSC" from the drop down(insight object single select field), then other fields show appear. But for some reason they don't show VSC is selected. Please assist.
Below is the code:
def businessUnit = getFieldById("customfield_10622")
def selection = businessUnit.getValue()
def application = getFieldById("customfield_11001")
def serviceAffected = getFieldById("customfield_11002")
def applicationVersion = getFieldById("customfield_11008")
def customer = getFieldById("customfield_11007")
if(selection == "VSC")
{
application.setHidden(false) //show the fields
application.setRequired(true) //set the fields to be required
application.setHelpText("This field is required, please provide information") //Helptexts
def applicationSelection = application.getValue()
if((applicationSelection == "MYSILS") || (applicationSelection == "PPECB") || (applicationSelection == "MYEXCHANGE"))
{
customer.setHidden(false) //show the customer field
serviceAffected.setHidden(false) //show the services affected field
}
else
{
customer.setHidden(false) //show the customer field
serviceAffected.setHidden(false) //show the services Affected field
applicationVersion.setHidden(false) //show the Application version field
}
}else{
//hide the fields
application.setHidden(true)
serviceAffected.setHidden(true)
customer.setHidden(true)
applicationVersion.setHidden(true)
}
Mmm, on Server, you can use whatever you want. The "short" answer to this might actually be https://docs.atlassian.com/software/jira/docs/api/8.5.13/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.