It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

Rajkumar Pasupunuri Mar 08, 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

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Next-gen

Introducing subtasks for breaking down work in next-gen projects

Teams break work down in order to help simplify complex tasks. This is often done iteratively, with tasks being broken down into smaller tasks and so on until the work is accurately captured in well-...

10,788 views 49 52
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you