You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
"I'm trying to use the smart value {{issue.creator.emailAddress.replace(/@.+$/, '@domain.org')}}
in a Jira automation rule to replace the domain of the creator's email address. However, the smart value doesn't seem to be working as expected. I'm using this in a rule triggered by issue creation. Can anyone help me troubleshoot this issue?"
I see this error in audit log
Hey there,
So, replace is for (String, String) https://docs.oracle.com/javase/7/docs/api/java/lang/String.html#replace%28java.lang.CharSequence,%20java.lang.CharSequence%29
If you'd like to utilise regex, then you'll need replaceAll.
Also, don't forget to escape characters, this should do what you are after -> {{issue.creator.emailAddress.replaceAll("\\@.+", "@domain.org"}}
Thank you for your reply, but I got the error
Error rendering smart-values when executing this rule:
Failed to get value for issue.creator.emailAddress.replaceAll("\\@.+", "@domain.org": {{issue.creator.emailAddress.replaceAll("\\@.+", "@domain.org"}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.