Forums

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

Automation - Description contains "value,value,value...". Is this possible?

Terry Dance
Contributor
December 14, 2023

New to Jira and we have an automation that looks for a code in the description. Each code has its own "else-if" section, but theres a "catch all" else-if created to look for 20+ codes, to then update a field if description contains one of those codes.

It has been written like,

elseifcontains.PNG.

Should this even work? From what I can tell it isnt working at all. Is there a correct way to write this out? Or will they need their own else-ifs, or should I turn the current else-if block into a "at least one condition matches", and separate them out there?

1 answer

1 accepted

2 votes
Answer accepted
Sayed Bares [ServiceRocket]
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 14, 2023

@Terry Dance separating them out might not be ideal if you have a long list.

I would suggest using {{smart values}} condition instead:

  • Set First value to {{issue.description}}
  • Set Condition to contains regular expression
  • Set Regular expression to (xxx|yyy|...|zzz) xxx, yyy, zzz are your number
    regex.jpg

To know more about OR operator in regex you can refer to https://www.ocpsoft.org/tutorials/regular-expressions/or-in-regex/

Terry Dance
Contributor
December 15, 2023

Awesome, thank you!

Suggest an answer

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

Atlassian Community Events