Copy description text to custom field

Hi! We are trying to add part of the text from the Issue Description to a custom field.

 

Explanation: 

*When you set Jira mail handler to create issue via email, there is an option to set a " Default Reporter".  But this option does not allow to add the "legitimate" reporter as a watcher, or unless send him notifications of the issue updates.

 

Jira add in Description somethin like: "[Created via e-mail received from: username <username@email.com>]".

 

So we want to create a script to add part of that text (just the email between < >) on a custom field. Then we will notify the user via post-function with email this issue addon as "recipients stored in fields!. 

Thnaks in advance!
Marcos.

1 answer

0 vote
Steven Behnke Community Champion Jun 19, 2017

Not possible out of the box.

Why don't you us the ability for JIRA to determine the user from the email? It should be an option instead of setting a default reporter.

Thanks for the reply Steven.

Because if the user does not exist on Jira, will create the account. We don't want that. 

We just need anonymous users to have the hability to create issues via email and get the notification when the issue is completed.

Steven Behnke Community Champion Jun 19, 2017

Do you have any plugins to support this? Like ScriptRunner?

Yes, I do have scriptrunner.

I am trying to do the same thing with script runner. @Marcos Quiroga Were you able to achieve this?

To be honest, this is trivial. Write a regex to capture the email between the less than and greater than symbols, and then add that to a custom field and update the issue. This would be a Script Listener likely.

I actually made this work in a similar way using an automation rule. 

 

Event: Issue Created

 

Edit Custom Field: Email Address

{{issue.description. substringBetween(" <",">]")}}

 

Now I want to send an Issue Created email to this email address, but this automation rule applies after the issue created event...

Automation plugin also has publish event option which allowed me to send notifications. Script listener captured the event and sent notifications

 

Thanks All

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

Meet the AUG leaders of Northern Virginia

@Rachel Wright (Jira Genie), @Billy Poggi (AUG NOVA, DC), and @Dana Jansen (Confluence Queen) are just some of the folks that lead one of the world's most active Atlassian User Group (AUG)....

135 views 5 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you