Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Sending email with the latest xls/xlsx attachment

Stella
Contributor
April 24, 2018

I want to set up a post function which sends out an email with an excel attachment.

I have 3 attachment in my issue and I only want to send out the latest excel sheet.

As a.isNew() is based on what is included in this transition, my attachments were added previously. 

How could I send out the latest excel version?

 

This is the current code 

import com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.MailAttachment 

{MailAttachment a -> a.isNew() && (a.filename.toLowerCase().endsWith('.xlsx') || a.filename.toLowerCase().endsWith('.xls'))}

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events