Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Automation: Attempting to save smart value match() to variable but it returns empty

Kim Barry November 15, 2024

Attempting to find when a comment contains an email and save the email to a variable. I have an advanced compare to verify the comment has an email but it does not save to the variable, the second advance compare always comes back empty.

varEmail.png


2 answers

1 accepted

2 votes
Answer accepted
Salih Tuç
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 15, 2024

Hi @Kim Barry , it is using Jira's Pattern class and look for matches. So, to mark a match, you need to use parentheses.

For example:

Instead of ".+@email.com", use "(.+@email.com)"

Of course, you need to modify the regex depend on your needs, it is just a dummy one :)

0 votes
Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 16, 2024

@Kim Barry -

Hi Kim:

Take a look of this Atlassian KB where it gives you some information on using Regex for automation -

https://confluence.atlassian.com/jirakb/extract-content-out-of-description-and-summary-with-regex-and-automation-1157495262.html

Hope this also helps.

Best, Joseph Chung Yin

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Upcoming Jira Service Management Events