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?
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.