Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

How to hide and show a field based on the values of another field

i want to hide and show a field based on the values of another field,how can i achieve the same? 

4 answers

1 accepted

0 votes
Answer accepted

The best way to do it is use Behaviours functions in the Script Runner add-on.  If you don't do it that way, then you're in to hacking your own javascript, which is a nightmare to make work in all places and maintain during upgrades.

@Nic Brough _Adaptavist_I am trying to achieve this same thing, but we are on Jira Cloud which I've read doesn't support this. Can you suggest another way of achieving this?

There is no way to do it on Cloud, that I know of.  It doesn't support the addition of the code you would need.

Hi,

On marketplace there is plugin called Dynamic Forms. You can show/hide fields, customfields or even all tabs based on value in select, multiselect, checkboxes or radiobuttons. Here you can find documentation: https://intenso.atlassian.net/wiki/display/DF/Dynamic%20Forms%20Home

 

I hope I've helped you

Best Regards,

Hello - I'm assuming that we can't use Dynamic Forms on cloud version?

Hi @Neethu Jose 

You can use Behavior in Jira Data Center and Server and apply the below code on the server side.

Step 1. Add Field based on which you want to Hide another field. Here I added the "Base Location" field, it's a single select field

Step 2. Add below code in server side script

Step 3. Save 

def selectlist = getFieldByName("Base Location")
def OtherBL = getFieldByName("If Other, Base Location")

def selectValue = selectlist.getValue()


if (selectValue == 'Other')
{
OtherBL.setHidden(false)
}
else
{
OtherBL.setHidden(true)
}

Suggest an answer

Log in or Sign up to answer
TAGS

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