Forums

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

Okay, here's a draft for your Atlassian Community post: Automation Condition for Description Field

Kevin Williams June 2, 2025

Hi everyone,

I'm trying to set up a Jira Automation rule that triggers when a ticket's description field contains the specific alphanumeric string "demo1".

I've configured the condition using "Issue fields condition" and set it to:

Description ~ "demo1"

However, this condition doesn't seem to be matching issues where the description clearly contains "demo1".

Interestingly, if I perform a JQL search in Jira using:

description ~ "demo1"

the search correctly returns all the relevant tickets.

I'm a bit stumped as to why the automation condition isn't behaving the same way as the JQL search for this alphanumeric string.

Could someone please clarify the correct way to set up an automation condition to match a specific alphanumeric string like "demo1" in the description field? Is there a different operator or syntax I should be using for automation rules in this scenario?

2 answers

1 accepted

0 votes
Answer accepted
Aaron Williams
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.
June 2, 2025

Hey @Kevin Williams 

Welcome to the community. 

There are a few quirks in Jira when trying to match text fields. So you may have found one. 

With this automation, trying to match text, it suggests something that will be occuring a lot. Is there a use case for this? Will Demo1 be the start of a common series of descriptions in the future? 

At bit more context as to what you are trying to do and future use case could help us see if there is a more efficient automation to set up. 

Thanks

Aaron. 

Aaron Williams
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.
June 2, 2025

To continue.

It seems to be working fine for me. 

Using Work item fields condition 

Field: Description 

condition: Contains

Value: Demo1

 

I have 4 tickets with Demo1 in the description and it finds all 4. 

Thanks

Aaron. 

Kevin Williams June 2, 2025

To provide more background, when using the Work item matches JQL condition in automation, the JQL query description ~ "demo" did not consistently identifying issues where the description contains variations like "demo1".

Attempts to broaden the JQL, such as description ~ "demo" OR description ~ "demo1", have also been unsuccessful.

The suggestion to utilize the Work item fields condition option as an alternative seems promising.

1- How can we effectively validate that an automation rule using the Work item fields condition option successfully identifies issues with "demo" and its variations (e.g., "demo1", "demo2", etc.) in the description?


2- Will switching to the Work item fields condition option resolve the current problem of JQL not matching these description variations?

Aaron Williams
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.
June 2, 2025

Ah, to keep things as they are on your end you could try wildcarding. Try description ~ "demo*"

As this will match anything immediately after the word demo. 

As for your second point, the work item fields condition works the same as "demo*", so I would say it's personal preference. 

Let me know how you get on. 

Aaron. 

Kevin Williams June 2, 2025

Hi Aaron,

Thank you for the wildcard suggestion; it proved very effective in broadening the selection.

I'm now encountering an issue with JQL matching for descriptions containing alphanumeric characters and colons, such as animals1:dog, animals1:cat, and animals1:horse. The description ~ condition is not successfully matching these patterns. These also have trailing folders (e.g. animals1:dog\lab).  Do you have any recommendations for handling this?

Additionally, a team member is experiencing similar difficulties with Work item matches JQL when attempting to match strings like cat.animals.com. This will also have other text afterwards too (e.g. cats.animals.com\mouse)

Aaron Williams
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.
June 2, 2025

You could try the advance compare condition, I believe that lets you use regex. Which you can compare against a smart value. 

Something like:

First value: {{Issue.description}} 

Condition: contains regular expression 

Regular expression: *(animals1:dog|animals1:cat|animals1:horse)

This is untested but give it a go. I always find the AI language models are pretty good with regex, so use one of the free ones to build some patterns for you. 

Regex will be great if you know you are going to reuse patterns/naming conventions over and over. 

Thanks

Aaron 

Kevin Williams June 3, 2025

@Aaron Williams Awesome, I didn't know about the regular expression option. The AI language model I was using did not provide this suggestion so I appreciate you sharing it here. Everything appears to be working now using the advanced compare condition. Thank you very much!

0 votes
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.
June 2, 2025

Hi @Kevin Williams -- Welcome to the Atlassian Community!

For a question like this, context is important for the community to help.  Please post the following:

  • what version of Jira are you using: Cloud, Server, or Data Center
  • for Cloud, what type of project is this: company-managed, team-managed, JPD, etc.
  • an image of your complete automation rule in a single image for continuity
  • images of any relevant actions / conditions / branches
  • an image of the audit log details showing the rule execution
  • explain what is not working as expected and why you believe that to be the case

 

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
ENTERPRISE
TAGS
AUG Leaders

Atlassian Community Events