Forums

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

How to replace a "@" character using the smart text "replace" function?

Katie Kusjanovic
Contributor
June 20, 2025

I've used the following syntax ... none successfully:

{{issue.customfield_XXXX.replace("\\@","thatGuy")}}

{{issue.customfield_XXXX.replace("\@","thatGuy")}}

{{issue.customfield_XXXX.replace("@","thatGuy")}}

2 answers

0 votes
Evgenii
Community Champion
June 20, 2025

Hi, @Katie Kusjanovic 

I checked smart value modification, that you're using, and it's working

{{issue.customfield_XXXX.replace("@","thatGuy")}}

In order to replace @ with [@] just use construction 

{{issue.customfield_XXXX.replace("@","[@]")}}

I made a basic rule, to check it:
Screenshot_34.pngScreenshot_35.png

0 votes
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 20, 2025

Hi @Katie Kusjanovic 

For a question like this, context is important for the community to help.  Please post the following:

  • an image of your complete automation rule in a single image for continuity
  • images of any relevant actions / conditions / branches
  • an image of the audit log details showing the rule execution

Until we see those...

 

What problem are you trying to solve with the replacements?  That is, "why do this?"

 

That at @ character can be replaced without escaping for a text field like this:

{{issue.description.replace("@", "Bill")}}

 

However, if you are actually trying to replace a user mention in a field, those are stored to use markup with the account ID value.  For example:

[~accountId:557057:1d4fd7f4-bbac-4466-82ee-aaabbbccc]

 

Kind regards,
Bill

Katie Kusjanovic
Contributor
June 20, 2025

i have a field (issue.customfield_11010) that contains an email address - katie@nope.nope and i want to change it to be katie[@]nope.nope 

 

the use case here is just simple content manipulation .. nothing fancy like the user mention example you posted.

Katie Kusjanovic
Contributor
June 20, 2025

the audit log seems to be pretty hunky-dory ... no issues with the rule firing weirdly / not firing

 

replace-the-at.jpg

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 20, 2025

Looking at the log you show, your rule uses the Edit Work Item action.  When you write the "after value", is that from the field? 

If so, the edit only updates the value stored in the Cloud, not what the rule has in memory.  Please add a Re-fetch Work Item Data action after the edit action, and before the comment and write to the log.  This will reload the data from the Cloud.

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events