Forums

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

Automation to read description field and paste into custom field

Jack Tucker
Contributor
July 5, 2023

Hi All,

I currently have an automation to link tickets together when a custom field has the same value, this custom field is setup as a "Text Field (single line)". This works when you put anything into it manually. 

What I am now looking to do is setup an automation to read the description field and auto populate this custom field. I am looking for it to pick out an email where the domain stays the same but the start is different. Lets say billybob@gmail.com, can someone help to see if this is possible.

The end goal is to have these tickets link together automatically, if there is a better way to do this ie. reading another value other than an email let me know :) 

Thanks! 

Jack

 

1 answer

1 accepted

1 vote
Answer accepted
Diogo Teles
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.
July 5, 2023

Hi @Jack Tucker

 

Extracting the domain information from the description could be done using an automation rule with REGEX. But the risk of error is high if the description does not follow a predictable structure. 

Check out this article Extract Content out of Description and Summary with Regex and Automation

It will give you some examples and best practices on how to use REGEX to populate fields.

If you are able to extract the email from the description, you can use it to create a variable and then use another match to extract the domain. More complicated domains may pose a challenge, such as "domain.co.uk"

The screenshots below are an example of what I just wrote above. Do not use this example rule as it is. Having a second email address in the description,  or an unusual domain name, will break this rule. It also assumes that the address in the description has been converted to a link during editing (e.g. [name@domain.com|mailto:name@domain.com]  Depending on how your description is being edited and formatted, this may not be your case. 

Screenshot 2023-07-05 125426.pngScreenshot 2023-07-05 125358.png

Once you find a way to populate your field automatically, you can use the linking rule you already have to create the links. But you will have to allow that rule to be triggered by others, in the rule details screen

Screenshot 2023-07-05 125729.png

I hope this helps you with your work towards finding a solution that works.

If you have a consistent description structure it will make it a lot easier to extract the domain information and will reduce the risk of error. 

Jack Tucker
Contributor
July 5, 2023

Hey @Diogo Teles 

 

Thanks for sending this over, big help! 

 

I can confirm that the tickets I am trying to automatically link together always have the same format, there are variables that change such as dates, names and email but the rest is the same, there are also multiple emails in these tickets :( 

Like Diogo Teles likes this

Suggest an answer

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

Atlassian Community Events