Regular Expression in Automation Rule in JIRA

Anirudh Nayak
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 12, 2023

Hello everyone,

I am trying to add a Regular expression check for the value of "Description" field in the issue. I want to check if the description field contains "PASS" word (case insensitive) then perform certain action. This works if I directly provide "PASS" for the description field with Contains condition but won't accept other cases. I have tried providing different regex such as "(?i)pass" , "/(?i)^pass$/" and many other patterns. Can you please provide the regex for such a case.

 

2 answers

1 vote
Manoj Gangwar
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 12, 2023

Hi @Anirudh Nayak , 

You may try something like below and use the JQL search condition. 

 

Description ~ "PASS*"

OR

Description ~ \"PASS\" 

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 12, 2023

Hi @Anirudh Nayak -- Welcome to the Atlassian Community!

First thing: the rules documentation around regular expressions states it is "based on Java's Pattern class", and others have found not all of the features from that spec work.  I find only experimentation confirms what does and does not work.

A work-around would be to force your description with toLowerCase() or toUpperCase() before the match() attempt.

Kind regards,
Bill

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