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

How to use smart values for automation that take values from the Description.

Eran Roiter June 28, 2024

Hey all, i have automation that triggered every time the description is updated.

 

Then it creates a variable and uses smart values to edit a custom field and add tagged users from the description to the custom field.

When i edit the description at first and tag a user its working, but when i edit the description again and add another user it won't add him.

any ideas what I'm missing?

Thanks !

1 answer

1 accepted

2 votes
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.
June 28, 2024

Hi @Eran Roiter 

For a question like this, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected.  Those will provide context for the community to offer ideas.  Thanks!

Until we see those...

From what you describe, I hypothesize there is an error in using the match() function to parse out the mentioned users.

The match() function can have problems if there are newlines or multiple matches not handled properly.  Perhaps try this expression to get the account id values from the mentions:

{{issue.description.replace("\n"," ").split(" ").match("\[~accountid:(.*)\]").distinct}}

That replaces the newlines and then splits on spaces first, reducing the scope the match needs to check.  Then it returns only the distinct values in case someone is mentioned multiple times.

Kind regards,
Bill

Eran Roiter June 28, 2024

Thanks for you answer! 

I will try what you suggested.

Eran Roiter June 28, 2024

It worked !!! thanks :) 

Like Bill Sheboy likes this

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