JIRA list custom fieldis

I need to put a condition on the user field in the post function. The custom field has a format list, i.e. The user chose the value and the function should look at this condition. Tell me how it can be done? How does getCustomFieldValue return a field of type list?

it's not working:

Is1 = issue.getCustomFieldValue(customField)

if Is1 == 'test1':

1 answer

0 vote

A "condition" has a very specific meaning in JIRA - it happens *before* a post function and *only* tells the system whether the current user may use the transition or not.

I am assuming by "field of type list", you're looking at a field that is a single-select list.  getCustomFieldValue will return an object representing the current selected, not a simple string.

You'll probably need something more like

if ( "test1".equals(Is1.getName()))

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published 9 hours ago in Trello

Alice Camilla on organizing your work/life/fandoms with Trello!

@Alice Camilla is a university student, currently writing her MA thesis in Archaeology. She's also a freelance blogger and content creator, writing about geeky stuff from productivity apps to JR...

35 views 1 6
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you