Forums

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

Email regex failing on automation rule

Richard Freisberg March 4, 2021

I need some help here.

Trying to set up an automation rule that gets the email from an issue collector form that gets added by the collector (done automatically).

I was originally trying to grab the email via a regex (I am fairly proficient in regex and have tested it online in multiple testers to validate it) and send the poster an email to notify them that we have received their issue and how to track it. But I can't even get the match to work properly.

I have tested getting the email many times with the log action. It fails every time.

Trigger: Issue Created
Then: Add value to the audit log
   This I have tried it with a basic and complicated regex. Currently I am trying: 
    reporter: {{issue.description.match(".*(parker).*”)}}

I get the same error:

Error rendering smart-values when executing this rule:Failed to get value for issue.description.match(".*(parker).*”): reporter: {{issue.description.match(".*(parker).*”)}}

 

I know I can get it to log when it is just

{{issue.description}}

 

Here is a sample of what it is parsing:

this is a test

Reporter: John Doe
E-mail: johndoe@parker.com

 

1 answer

1 accepted

1 vote
Answer accepted
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.
March 4, 2021

Hi @Richard Freisberg 

When I pasted your smart value string into a plain text editor, I noticed that the second quotation mark is a slanted (curly) one:

-------------------------------------------------|
reporter: {{issue.description.match(".*(parker).*)}}

Please try replacing that second quotation mark and see what happens.  Thanks!

Best regards,

Bill

Richard Freisberg March 5, 2021

Wow...  I never saw that!  

I will test that.. 

Richard Freisberg March 5, 2021

Ok Bill...  

I know we have all been there..   doing something over and over again, testing, tweaking, looking through documentation...  and the finally asking for help just to find out one little thing was wrong.

You found that for me!  

Thank you so much!!!

Like Bill Sheboy likes this
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.
March 5, 2021

I am glad that worked! 

And, I wish the rule editor showed better error messages before publish and after execution.  Showing smart values as proportional fonts (rather than fixed) makes it very difficult to see issues too.  :^)

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