You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Raley notification allows you to send files added into Jira issue or ServiceDesk request as first-class email attachments. Here are the examples and explanations of the different ways attachments can be added.


Attaching ALL files that are uploaded to specific ticket

$jirassimo.includeAttachment("")


Attaching ALL pdf files uploaded to specific ticket

$jirassimo.includeAttachment("*.pdf")

Instead of "pdf" you can specify any other file extension


Attaching all files that satisfy specific condition

#foreach ($att in $!issue.fields.attachment)
   #if ($!att.filename.startsWith("invoice"))
      $jirassimo.includeAttachment($att.id)
   #end
#end

The snippet above will attach only those files which filename starts with the word "invoice". You can add any custom logic in Velocity format here to check against author, size, mimeType and


Attaching all files from last comment

One of the most typical requirements is to send files attached with the latest comment in Jira or ServiceDesk to customer email. In Jira/SD comment files can be added as regular attachments or inline. Moreover, when adding file inline, it could contain both - an optional thumbnail in the comment text and the full version which will open when clicking on the thumbnail.

Raley will do all the heavy duty for you and add both regular and inline attachments to your email. Here's the example on how to send all the files from last comment. 

#foreach ($att in $issue.lastcomment.attachments)
   $jirassimo.includeAttachment($att.id) 
#end