Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Script runner 'send a custom email': select attachments to send.

S June 29, 2015

Hi all,
Is it possible to create custom field (checkbox or select list) which allow to select previously added attachments? Or maybe it possible with built-in Script Post-Function? 

Thanks in advance!

BR, Serge

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 23, 2015

HI Serge,

You can use the Send a custom email scripted post function and include some code similar to the example below in the Custom attachment callback section in order to specify what attachments you want to email.

import com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.MailAttachment
{MailAttachment a -> a.filename.toLowerCase().contains('test.txt')}

 

Thanks

Kristian

Yogesh Mude[Jira]
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.
February 13, 2017

Hi @Kristian Walker (Adaptavist) & @Jamie Echlin (Adaptavist),

We are also looking for the same functionality what the *Serge* has looking.

We are tested as well by using Script Runner Custom Attachment callback and we are able to send the mail with attachment but the thing here is we want the like Whenever user has create the ticket the automatically mail goes to him/her as looking for some custom field data/issue type but for sending the attachment some where else we want to store that attachments right?

so can you help me here to configure this/achieve this functionality. 

TAGS
AUG Leaders

Atlassian Community Events