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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,459,266
Community Members
 
Community Events
176
Community Groups

Read from description and set reporter for email requests

Hi,

 

I'm automating an email request and below is my use case. 

When users send an email to createTicekt@test.com, an email request ticket will be created.  

Below is the sample from the email 

```

User Name :  Krishna

User email : Krishna@test.com

User location : Las Vegas

```

I'm writing the automation to read the description when the new ticket is created. I need to pick the value from User email and set him as the reporter. 

In the above case Krishna@test.com will be reporter.  I'm trying to use smart values to get the user email from the description and the below is the regex i'm using. 

{{issue.description.match(".*(?<=User email :).*")}}

Can someone provide suggestion on the regex to get the user email as the above regex is not working ? 

Thank you

2 answers

I used the below regex to get the user email and it works. 

{{issue.description.match("((?<=Useremail\:) [a-zA-Z0-9- ]+)")}}

Florian PEREZ Community Leader Aug 18, 2022

Hey ! 

Happy to see that solve your issue.

 

Don’t forget to accept answers if it help you ! 

0 votes
Florian PEREZ Community Leader Jun 12, 2022

Hello, 

AFAIK You should not need to get this information by building a regex.

When user open a request by mail, JSM keep the value so you can use it. You should be able to get the value with something like {{creator.email}} (not tested but it should be something like that).

The use case you mention could also be someone open the ticket in behalf of someone else. In this case there is 2 ways, first you can add them as cc on the mail and use the value of viewers (user in cc are added as viewer). 

If you want to check more about you regex and your not on a free plan you should open a ticket to the atlassian support. I think it should be a really quick for them to help you on this one. 

Hope this help. 

Thanks @Florian PEREZ . I will open a ticket with Atlassian support for regex. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS

Atlassian Community Events