Forums

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

Test if a variable is in a drop-down list

Yannick TEMPORAL August 8, 2024

Hello,

In Jira cloud, I have tickets that are automatically created from mail.

I have created a variable {{TypeDemand}} fed from a regular expression based on the body of the mail.

In an automation, I need to check if this variable matches one of the items in a dropdown list (it is a custom field) :

Dropdown.png

Thank you

1 answer

1 accepted

0 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 8, 2024

Hi @Yannick TEMPORAL -- Welcome to the Atlassian Community!

Yes, that is possible in at least two ways:

#1) Hard-code the values in your automation rule, using a smart value condition with the regular expression.

#2) Using the Send Web Request action, call the two different REST API endpoints to get the custom field's context id and then the options.  Use the results to build your regular expression, and then perform the test.  This approach will allow the field values to change over time without needing to change the rule.

If you want to try the second approach, here are some references to help:

Kind regards,
Bill

Yannick TEMPORAL August 9, 2024

Thanks @Bill Sheboy To speed things up, I've hard-coded the values in the automation rule. But I'll have to do better!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events