Forums

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

Looking for behaviour code example to show/hide values in a dropdown based on another field

Denise Wermager
Contributor
October 22, 2025

I am looking for anyone that may have code example of a behaviour for JIRA cloud that shows/hides values in a multi-select field based on the selection of a specific option in another multi-select field.   

  • I have two fields: A & B
  • Both are of type multiselect
  • Field A has options x,y,z
  • Field B has options 1,2,3,4,5
  • If user selects x in Field A, Field B should provide options 3,4,5
  • If user selects y or z in Field A, Field B should have all options 1,2,3,4,5

We do have the Scriptrunner plugin and we are working on migration from DC to cloud. I need to replicate a behaviour I have in DC in the cloud. 

2 answers

1 accepted

1 vote
Answer accepted
Kristian Walker _Adaptavist_
Community Champion
October 23, 2025

Hi @Denise Wermager ,

I have created an example script, located here, that can be used with Behaviours for Jira Cloud and demonstrates how to restrict values in one Multi Select List field based on values selected in a second Multi Select List field. 

In this example, you just need to update the IDs for your custom fields as well as the option IDs in the script to match the IDs from your instance. 

You can use this script as a reference to create the script you need within your instance. 

I hope this helps.

Regards,

Kristian

0 votes
Tomislav Tobijas
Community Champion
October 23, 2025

Hi @Denise Wermager ,

I'd say the best bet would be to reach out to Adaptavist Support. We did a couple of migrations, and their team usually has those scripts 'stashed' and they can easily share them with you (depending on how complex the use case is) 🤔

I think something like this is partially possible in the cloud (not a replica of DC behavior), but some of my colleagues work more with scripts than myself.

Again, the vendor's team usually can assist with the recreation of scripts and behaviors or suggest a potential workaround when it comes to migration from DC to the cloud.

Cheers,
Tobi

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
ENTERPRISE
TAGS
AUG Leaders

Atlassian Community Events