Forums

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

Extracting specific info from a comment

Robin Stemmers
Contributor
August 19, 2021

Hello All

Hoping you can help.

I am getting feedback in the comments section let me know what the email address is.

EG. the comment will contain a phrase like below:

-Author Name date time

Email Address: Name.Surname@domain.com

I want to be able to extract the email address and update a custom field with that address only.

How can I do that?

3 answers

1 accepted

2 votes
Answer accepted
Robin Stemmers
Contributor
August 19, 2021

Hello Gents

Found A way - use it don't use it :)

It does what I need :)

Create Variable 

Variable Name: emailExtract

Smart Value: {{issue.comment.last.body.substringAfterLast("o:")}}

Field to update:

My field name  = JML Email Address = update the respective field with the Variable and some smart stuff :)

{{emailExtract.substringBeforeLast("]")}}

 

Extract Comment-Project automation - Jira Service Management.png

2 votes
Jack Brickey
Community Champion
August 19, 2021

There are a few posts I have seen on this topic. Here is one I have referenced previously.

Automation-Regex-extract-email-address-from-Issue-Description 

0 votes
Ignacio Pulgar
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.
August 19, 2021

Hi @Robin Stemmers ,

One Jira issue may have multiple comments, so I assume you would like to store the email address of the user who last added a comment to the issue, in a custom field possibly named Email.

automation-rule.PNG

I copy here the smart value so that you can copy it easily:

{{issue.comments.last.author.emailAddress}}

Hope it helps.

Regards

Jack Brickey
Community Champion
August 19, 2021

I thought she was asking to extract an email from the text in a comment, but may be mistaken.

Robin Stemmers
Contributor
August 19, 2021

No - its not the author email address

:(

Robin Stemmers
Contributor
August 19, 2021

@Jack Brickey  what you are stating is correct

Ignacio Pulgar
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.
August 19, 2021

Oh, then I misunderstood it :)

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