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

1 vote
Accepted answer

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 Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,098 views 4 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