The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

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 Champions.
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!

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events