Forums

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

Take e-mail from description field

Urmo
Contributor
September 22, 2023

Hi

We have tickets where in description have user e-mail like mari@kalle.ee. I read that i can't directly set e-mail to Reporter system field and so i created Reporter e-mail custom field (text field type).

now automation take out e-mail from description field how it should but format on custom field is not correct.

image.png

Field value: {{issue.description.substringBetween("E-post:","\n")}} 

Right now format is not ok for me. What i should change?

image.png

1 answer

1 accepted

2 votes
Answer accepted
Marcus Jones
Community Champion
September 22, 2023

Hi Urmo,

 

You might try using a variable instead. For example, I do something similar, but I am editing the Reporter field, not a custom field.

Fortunately for me it is more clear cut since the email is surrounded by **. 

So I create a variable = FromSender using {{issue.description.substringBetween("**","**")}}

and then in the field I want to set, just apply the variable {{FromSender}} and all is well. 

It seems to me like your syntax is not terminating at the correct end position. 

Urmo
Contributor
September 25, 2023

Hi

Seems to be that there is some not the best solution but here is how i did do it now:

First take out e-mail address from description:

{{issue.description.match(".*E-post: (\S+).*")}}

image.png

After that i did issue edit again because right now i dont have any good idea how i can clean custom field from not needed values. it show with this data right now:

image.png

There is [ mark, then e-mail and after that |mailto: ] what is not needed form me. So i did edit issue again:

image.png

And now after this grazynes it is beautiful for me:

image.png

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events