Edit Created Variable

Hi!

I'm trying to edit the information that I set on a variable, for example:

I'm creating the variable {{person}} with the smart value from {{issue.reporter.emailAddress}}, and I need to remove the @company.com from the variable, so I'll get only the name.lastname from the whole email address. Is this possible?

1 answer

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.
May 9, 2024

Hi @Gabriel Freddi de Matos Santos 

You could do that with the substringBefore() function when you create the variable:

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/#substringBefore-String-separator-

For example with this:

{{issue.reporter.emailAddress.substringBefore("@")}}

And just to be clear, a rule cannot edit a Created Variable: however, you may re-create it with the same name to replace the value.

Kind regards,
Bill

Gabriel Freddi de Matos Santos May 14, 2024

It worked, Bill! Thank you very much.

Like Bill Sheboy likes this

Suggest an answer

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

Atlassian Community Events