regex in jira automation seems not working - reopen resolved ticket depending on comment

felix.weber December 5, 2020

Dear community,

Environment: Jira Service Management (Cloud)

 

What I want to achieve: Reopen a resolved issue if the reply / comment does not contain something like "thank".
In a more complex case should be case-insensitive and different languages - see regex examples below...

BTW: for testings below I have removed all additional conditions e.g. condition to check resolved status in order to point out it is related to regex

At a very basic level I could easily use the condition "does not contain" the word "thank" - which will work! 

Project automation_BasicDoesNotContainThank.png

However this is limited only to "thank". Working in a multi-national company I wanted to cover other languages as well. Therefore thought about regex. I had build a more complex regex (see below) but to start with an easier one lets go with this example as it is easier to understand (adapted this from atlassian-documentation). Ignore the case-sensitive for now.

(thank|thx|dank|merci|tia|tnx|grazie|gracia)

This is basically a list of words, separated by pipe.

 

The automation will look like

Regex_Pipedonly.png

 

However I realised a strange behaviour:

  • When using the condition "does not match regex" the issue will be re-opened no matter what the reply is - so even if the comment contains something from the regex 
  • When using the condition "contains regex" OR "exactly machtes regex" the issue will remain resolved - no matter what the reply is

 

Initially I had setup the more complex regex already a while ago and I was sure it works:

^(.*(tha?n?ks?|thx|dank*|merci|tia|tnx|grazie|gracia).*)$ /gi  

However I realised 1-2 weeks ago that our issues won´t reopen and remain resolved. Therefore I started to investigate and ease our regex to the piped-example shown above.

Feels like as soon you enter any kind of regex the automation or condition does not work correctly anymore - of course maybe I am doing something totally wrong ;)

 

As I was sure it works maybe I was wrong ;) OR it might be related due to the ITSM launch ?!

can you confirm if you face same issues or lead me what I am doing wrong ?

 

thanks in advance

cheers

felix

2 answers

0 votes
Benjamin Sørensen February 22, 2024

Hi Felix :)

 

I know this is a rather old post, but I'll add my workaround here, in case someone else stumbles upon this problem:

An option like "does not contain regular expression" is missing for this to work.

A workaround is to use the "conatins regular expression" condition, and branch the automation out to some dummy action.

What I've Done:

* New If Else condition

* If Condition:

Screenshot 2024-02-22 144005.png(Regex looks for "Thanks" in danish and swedish, with a case insensitivity flag)

* Dummy action on the if condition: Screenshot 2024-02-22 144131.png

 

* My full tree looks like this, with the actions I actually wanna take if the regex DOESN'T match under "Else":

Screenshot 2024-02-22 144342.png

0 votes
Callum Carlile _Automation Consultants_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 26, 2021

Hi @felix.weber, I've got  a few troubleshooting questions:

  • Looking at the rule's audit log, is the automation rule triggering?
  • If it is triggering, are there any errors/warning messages?
  • If it's not triggering, is the project definitely included in the scope of the automation rule in the Details tab?

Suggest an answer

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

Atlassian Community Events