Regex in automation not working

Becky November 19, 2024

My group is using an issue collector.  When an issue is created via the collector, the following information is added to the Description field: 

Reporter: Person X's name
Email: Person X's email

Because that is not particularly helpful, we need the information following "Reporter: " (i.e., Person X's name) to be copied to a custom text field called "Submitted by". 

I created an automation using the guidance here and have a similar set of steps as in that example.  My regex for the THEN step, which completes the "Submitted by" field, says:

{{issue.description.match(".*Reporter: (\S+).*")}}

But that is not copying information over to the "Submitted by" field.  Unhelpfully, the audit log for the automation says it was successful and is showing no errors.

Any idea of what might be wrong?  I am new to regex but from what I can tell from online sources, the regex above is correct for my purpose. 

1 answer

0 votes
Ramin Shanehsaz
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.
November 19, 2024

Hi,

I’m unable to open your link, but it’s possible that the regex isn’t matching due to the formatting of:

Reporter:

In Markup, this is formatted as:

*Reporter:*

You’ll need to adjust the regex accordingly, like this:

".*\*Reporter:\* (\S+).*"

(Be sure to pay attention to the space placement after the colon.)

The best approach is to change the description of an existing issue to "Text" format to check how it’s structured.

I hope this helps.

Best,
Ramin

 

 

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