Send email to user in custom field when issue transitions

Michelle Larson
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.
March 22, 2016

We have a workflow that has a field called Reviewer and in the workflow the assignee will click the transition Needs Reviewed, what they want is for an email to be sent to the the email address of the user listed in the Reviewer field.

3 answers

1 accepted

0 votes
Answer accepted
Mark McCormack _Adaptavist_
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.
March 22, 2016

Hi Michelle,

The functionality you want is documented in our built-in scripts section of the ScriptRunner documentation.

I read this again, as a transition, you need to do the following steps

  1. edit your existing workflow
  2. choose Add PostFunction
  3. Choose Script Post Function
  4. Choose Send a custom email
  5. Add "Send to reviewer" in the note field
  6. Find out the customfield_id of your Reviewer field (this link shows you how to find your customfield id)
  7. put this value into the "To issue fields" textbox Screen Shot 2016-03-22 at 20.35.12.png
  8. Choose the Add button and your publish the new workflow.

I hope that helps.

Michelle Larson
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.
March 23, 2016

I did this and it shows in the workflow that it has successfully sent 2 email's I had me listed in the reviewer field however I never got email for it.  I think the issue is that Reviewer is the user name (selected by the user picker) and not an email address is there any way to get it to send to the users email?

shows success.png

 

Like Rachel Uptain likes this
1 vote
Sten Sundelin
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.
March 22, 2016

Adaptavist Scriptrunner (a paid-for add-on) has a built-in script to send custom emails.

You can probably run this as a post-function in the transition.

Not sure of other ways to do this.

0 votes
Tibor Hegyi _META-INF_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
March 22, 2016

If for any reason ScriptRunner is not enough, you can try Email This Issue (also paid-for) that has built-in support for a full featured email postfunction which you can use to flexibly specify recipients, email templates and add attachments to the email.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events