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
Community Members
Community Events
Community Groups

Updating list


Hello everyone 

This code it's functionnally : 

import com.atlassian.jira.component.ComponentAccessor

def singleSelect = getFieldById(fieldChanged)

 multiSelect = ComponentAccessor.customFieldManager.getCustomFieldObjectByName("CustomFieldB")
def msConfig = customField.getRelevantConfig(issueContext)
def msOptions = ComponentAccessor.optionsManager.getOptions(msConfig)

def filteredOptions = msOptions

switch (singleSelect.value) {
    case "1":
        filteredOptions = msOptions.findAll {it.value in ['A', 'B', 'C']}

    case "2":
        filteredOptions = msOptions.findAll {it.value in ['D', 'E', 'F']}


But i would like when i clik in case "1" and after i click in case "2" the list does not updated 

exists a function for updating list or ohter , beacuse im need this functionnallity for continue the project


Thanks in advance :) 

1 comment

As I understand it, you are setting this behaviour for the single select field, hence

def singleSelect = getFieldById(fieldChanged)


And then you want to change the options for other field B

def multiSelect = ComponentAccessor.customFieldManager.getCustomFieldObjectByName("CustomFieldB")


However, in your snippet, you are setting these values for 'formField':



And this I think should be instead



Because formField I assume refers to your single select - which is what the code is attached to.

Yes , but i'm search a function who do update a liste when i change in between case in real time


Log in or Sign up to comment
Community showcase
Published in Jira Software

An update on Jira Software customer feedback – June 2022

Hello Atlassian Community! Feedback from customers like you has helped us shape and improve Jira Software. As Head of Product, Jira Software, I wanted to take this opportunity to share an update on...

5,077 views 18 32
Read article

Atlassian Community Events