Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,359,975
Community Members
 
Community Events
168
Community Groups

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

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

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira

Online AMA this week: Your project management questions answered by Jira Design Lead James Rotanson

We know that great teams require amazing project management chops. It's no surprise that great teams who use Jira have strong project managers, effective workflows, and secrets that bring planning ...

179 views 1 6
Read article

Atlassian Community Events