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,363,018
Community Members
 
Community Events
168
Community Groups

How to read the selected values of a multi-select custom field using behaviour in jira

Hi,

I have two custom fields : deferred (multi-select) and Target release (single list)

Need to write a script where value of 'deferred' field (all values of multi-select) should be less than the field value 'Target Release'

Any help would be appreciated. Thanks

1 answer

0 votes
Tom Lister Community Leader Nov 03, 2018

Hi @Mamta Verma

def customFieldManager = ComponentAccessor.getCustomFieldManager()
def fieldObj = customFieldManager().getCustomFieldObjectByName("FieldName")
def value_field = issue.getCustomFieldValue(fieldObj)


value_field should be a List of strings for normal select or a list of Versions for a field like Fix Versions.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events