Our first template is eternal classics: we'll show issue key and some static text. It looks like:

 

#foreach ($issue in $issues)
   Hello from $issue.key
#end

 

The output will be:

Hello from JAD-4

 

As you may have noticed, we're using the Velocity syntax to write the templates. It's a powerful language that provides many constructs for the custom rendering of data. You don't need to know it well, but just the basics to start using Jirassimo. Go through our examples and read the explanations.

The second important point here, is the following statement:

#foreach ($issue in $issues)

You may wonder, why would we need to iterate through issues if there's always one issue at hand when Jirassimo handles an event from JIRA? Why cannot things work as simply as: 

Hello from $issue.key

Well, the reason is that we DO have ONE issue when handling create/update/delete event from JIRA, but there can be any number of issues when we use a scheduled messenger that runs regularly on it's own. So, to preserve consistency in templating we ALWAYS have to go through array of $issues