The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

I wanted to display a field based on values of two other fields

Raj Kumar
March 8, 2019

I wanted to display a field based on values of two other fields using Field Behaviors and used the below-given server-side script but this isn't working please suggest how we can achieve this

 

import com.onresolve.jira.groovy.user.FieldBehaviours
import com.onresolve.jira.groovy.user.FormField
import com.atlassian.jira.component.ComponentAccessor
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def optionsManager = ComponentAccessor.getOptionsManager()

def application = getFieldById("customfield_10301")

def instance = getFieldById("customfield_14429")

def FlexADAccountID = getFieldByName("Flex AD Account ID")

if (application.getValue() == "NetSuite" && instance.getValue() == "Production"){

FlexADAccountID.setHidden(false)}
else {
FlexADAccountID.setHidden(true)
}

 

Thanks,
Raj

 

0 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

TAGS
AUG Leaders

Atlassian Community Events