Skip to end of metadata
Go to start of metadata

A very typical problem you might be stuck with is this:

My Custom scheduled messenger returns multiple issues. I need to send the results in nicely formatted emails. How do I achieve this?

And here's a screenshot that demonstrates a simple messenger template that outputs issue key, summary, assignee and deadline :

Ideally, you'd like to receive something like this:

Issue keySummaryAssigneeDeadline
ABC-1Summary 1JBeth23/02/2015
MFP-53Summary MFP-53 as it comes from issuemdodds02/05/2016
MFP-90Another example of issue 17/03/2016

 

However, if we run the code as it is now, it will produce a result similar to the following:

Not good, everything is in one line and there's even no line-breaks inside. Let's try to improve this. 

Jirassimo supports HTML formatting inside Code widgets, so, we could try to create a table like this:

Note, that inside of every iteration #foreach ($issue in $issues) we open and close a new table row. This will make our data look tabular. To improve readability of the data we add border to the table by declaring border="1". For more information about possible table formatting please refer to https://www.w3schools.com/html/html_tables.asp

NB! It is imperative that you use HTML formatting (like using <table> tags) ONLY inside Jirassimo widget of rich text editor. If you attempt to create a table directly in the editor by using similar code, then it will be literally rendered as 

<table>

  <tr>

   <td>Issue key</td>

.....

  </tr>

</table>

 

  • No labels