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

Compare with Current View Page History

« Previous Version 4 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 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 or 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. Normally, the Jira or SD will require user to log-in to the portal to download the attachments.

With Raley Notifications you can handle comment attachments much better - all of them will be added as first class email attachments (both regular and inline). This code snippet below will do the magic for you:

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


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