Pulling information out of description using 'Automation For Jira'

Pamela Buder October 10, 2017

The Issue Collector stores the reporter/email information at the bottom of the description. I want to pull the reporter name and email out to store in actual jira fields using automation for jira addon. I've been struggling and wondering if its because of the formatting that is applied? Does anyone have an example of this that would help?

 

 

EXAMPLE BELOW: ---------------------

Description text goes in here and can be of any length. It's followed by the following which is the fields from Issue Collector and has the formatting as shown. 

 

Reporter: Pamela
E-mail: email@gmail.com

1 answer

0 votes
Scott Harwood
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.
October 10, 2017

Hi Pamela,

Yes you can do this using smart values and the match function. You would use the create issue trigger, then in and edit action, you would add the fields you want to set, using the values below to set them.

   {{issue.description.match("Reporter:\s(.*)")}}

   {{issue.description.match("Email:\s(.*)")}}

Let me know if that works for you.

 

Cheers,

Scott 

Pamela Buder October 11, 2017

It didn't work.

image.png

Scott Harwood
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.
October 12, 2017

I think it is because it contains wiki markup, can you click to edit the description and send a copy of the text in the textarea. 

Thanks.

Pamela Buder October 23, 2017

This is a description.

*Reporter*: Laura
*E-mail*: [mailto:laura@stjude.org]

Amanda Ward January 6, 2021

I have a similar problem and I'm not using wiki markup. Jira automatically recognizes the Project-Key text even without the wiki markup being used and I'm still getting error on using "match" with Description field. 

Alvin Chan [Ease Solutions] November 10, 2021

Hi,

In case anyone is still searching for the relevant match syntax to extract the email from description, this post did the trick for me:

https://community.atlassian.com/t5/Jira-questions/Re-Re-Automation-Regex-extract-email-address-from-Iss/qaq-p/1715211/comment-id/486723#M486723

Like Christopher Franzke likes this
Antonio Rodriguez January 10, 2023

Hi @Scott Harwood

Sorry to revive this, but your regex worked for me and I need to expand it a bit with OR. Maybe you can help me.

 

I'd like to account for different options/languages, such as Center, Centro, Centrum.

So from your original one (which works)

{{issue.description.match("Center:\s(.*)")}}

 

I've tried (Googling and also asking ChatGPT to see alternatives):

{{issue.description.match("Center:|Centro:\s(.*)")}}

{{issue.description.match("(Center|Centro):\s(.*)")}}

{{issue.description.match("(?i)(Center|Centro):\s(.*)")}}

But I get either an error, or "Center" as the output instead of whatever is after Center/Center.

 

My goal is to allow for "Center name", "Nombre del centro", "Nome del centro" (I'm saying this because the spaces might be important).

 

Thank you in advance

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events