Jira Email This Issue - Use custom Field as Sender email address

Is there a way to have a customfield that holds an email address be placed in the "From" of the email instead of the current user? I'm looking for functionality similar to "Recipients (To):" configuration where I can select a custom field.

1 answer

1 accepted

You can try Scriprunner plugin.
Possible solution: Prepare workflow transition with name Send E-mail. Use Script Post-Function (of the Scriptrunner) in workflow transition and choose prepared function Send a custom email (to send an email based on the provided template if conditions are met). You can also add Screen with Custom field (eg. To) to this transition.

Link to source of the Send a custom E-mail postfunction (Script Runner plugin)

Vidic - I am trying to follow your code and I get the basic functionality, however I am confused with what is setting the parameters that gets passed in to doScript and how exactly is it mapping to the template created in JETI?

Code is buildin function for Script Runner plugin (Free plugin), not for JETI.
(And you don't need to change code :-) )

Instructions to prepare jira to be able to Send E-mail from Issue
1. Install Script Runner plugin

2.1 Create new workflow transition (e.g. Send E-mail)
2.2 Add postfunction to transition
2.3 Click on View Post Functions
2.4 Click on Add link
2.5 Select Script Post-Function
2.6 On new form click on Send a custom email

3 On new form enter values for all necessary fields
Follow Jamie's instructions on link https://jamieechlin.atlassian.net/wiki/display/GRV/Built-In+Scripts#Built-InScripts-Sendacustomemail

You can use all issue fields.

It is possible to test/preview template in admin section (Plugins, Builtin Scripts, Send a custom email)


4 Prepare new screen with fields you want to change before sending email
4.1 Create new screen
4.2 Link screen to postfunction
4.2.1 Click on Edit Transition
4.2.2 Select prepared screen in the Transition View field
4.2.2 Publish workflow

5 Test in Issue (click on Send E-mail button, change data and send)

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,338 views 14 20
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot