Forums

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

Script Runner Regex to find an email address in a description and copy to a custom field

Lenny Emmerton
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!
June 6, 2018

Hello, I need a script that searches for an email address in my description field and then copies this address to a custom field.

1 answer

0 votes
Alexey Matveev
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.
June 6, 2018

Hello,

Here is how you can find a email address in the Groovy language:

https://compoundthinking.wordpress.com/2012/06/04/how-to-validate-email-address-with-regular-expression-in-groovy/

After you received the address you can save it in a custom field like this:

https://community.atlassian.com/t5/Jira-questions/Updating-a-custom-field-using-groovy-script-runner/qaq-p/256708

Look at the Jamie Echlin answer.

Suggest an answer

Log in or Sign up to answer