Forums

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

Attempting to pull an email from description, use it to create a user and set that user to reporter

Tom Marriott August 3, 2023

Summary captures the essence of it. We have a NOC which will be raising tickets to our system consisting on Summary and description fields completed only. 

Our requirement currently is to pull the users name and email to create a new account (if needed) and set it as the reporter. In some cases we may need a new ticket created in another project, but this is a simple process once the reporter is set.

The current automation is failing first at the regex to pull the email and put it in a field. Currently it is successfully finding the email, but pasting it in the field twice.

{{issue.description.match("([a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+)")}}

I am new to regex so I may have missed something obvious, I tried adding a .first in but not change to the double paste.

If you have any idea why it is posting twice, or a simple solution to this requirement I would appreciate any assistance.

Thanks in advanced.

 

Screenshot of current automation (I still need to make the command to get the users name out of the description, but one problem at a time).

screenshot jira automation example.png

1 answer

1 accepted

0 votes
Answer accepted
Ste Wright
Community Champion
August 5, 2023

Hi @Tom Marriott 

Is the text in a specific location in "Description" each time, and near any other text which is always the same?

An example of the text in the Description field would be beneficial :)

Ste

Tom Marriott August 9, 2023

It should follow a standard data set which is filled in manually. We managed to find a working solution with variables rather than populating custom fields. So I don't know why it duplicates twice, but a workaround has been found. Thanks for replying though.

Like Ste Wright likes this
Tom Marriott August 9, 2023

The typical data set would intro like as follows:

 

Customer Name:

Customer Email:

Customer Phone Number:

Customer Organisation:

Detailed summary of ongoing fault:

 

So we have used some automation like this to fetch from the MDS as a variable then create a user and apply it to the incident:

example.png

Colleen Langerhans
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 21, 2024

This has been super helpful.  Can i also see the logic for the Add new customer and Edit issues field?

I am not able to figure out how to leverage the new smart values.

Suggest an answer

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

Atlassian Community Events