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

Nancy Blackwell
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.
April 23, 2013

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
Answer accepted
Vidic Florjan
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.
April 23, 2013

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.

Vidic Florjan
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.
April 23, 2013

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

JamieA
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.
April 23, 2013
Nancy Blackwell
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.
April 24, 2013

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?

Vidic Florjan
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.
April 25, 2013

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