Hi Team, We are trying to generate an HTML format email with tabular data, and given below is the code for the same
1) How to get border added to the table
2) How to add background color
3) Control the styling aspect (Width of column)
We checked the HTML markup option but the wiki has only an option for the font if we add the manual table styling in getting applied but not working with lookupIssues.
Sample Mail without border and styling support.
Send Email Option Content:
Hey Team, we still have the following issues left to complete this sprint:
<br><br>
<p> Total number of Open Issues are {{lookupIssues.size}} </p>
<table>
<tr style="border: 5px solid black">
<th style="text-align: left">Assignee</th>
<th style="text-align: left">Summary</th>
<th style="text-align: left">Status</th>
<th style="text-align: right">Last Updated</th>
</tr>
{{#lookupIssues}}
<tr>
<td>{{assignee.displayName.htmlEncode}}</td><td><a href={{url.htmlEncode}}>{{summary.htmlEncode}}</a></td><td>{{status.name.htmlEncode}}</td><td style="text-align: right"><font color="red">{{updated.longDate.htmlEncode}}</font></td>
</tr>
{{/}}
</table>
Regards,
Pawan
I'm not sure where you're going wrong, but this produces a formatted table with borders and background colours for me.
<table cellspacing="0" bordercolor="#B7B7B7" border="1" cellpadding="5" style="font-family:arial align:left;">
<tr BGCOLOR="#DFDFDF">
<th>Sprint</th>
<th>Jira ID</th>
<th>Type</>
<th>Summary</th>
<th>Status</th>
<th>Ver(s)</th>
<th>Epic</th>
</tr>
{{#lookupIssues}}
<tr>
<td>{{sprint.last}} {{sprint.endDate.last.convertToTimeZone("Australia/Hobart").format("dd/MM/yyyy")}}</td>
<td style="white-space:nowrap"><a href="{{url}}">{{key}}</a></td>
<td><font color="{{#if(equals(issueType.name, "Story"))}}#008800{{/}}{{#if(equals(issueType.name, "Bug"))}}#EE0000{{/}}{{#if(equals(issueType.name, "Task"))}}#0000DD{{/}}">{{issueType.name}}</font></td>
<td>{{summary}} </td>
<td BGCOLOR="
{{#if(equals(status.name, "To Do"))}}#EEEEEE{{/}}
{{#if(equals(status.name, "Backlog"))}}#EEEEEE{{/}}
{{#if(equals(status.name, "In Progress"))}}#DBE9FF{{/}}
{{#if(equals(status.name, "Awaiting Review"))}}#DBE9FF{{/}}
{{#if(equals(status.name, "Code Review"))}}#DBE9FF{{/}}
{{#if(equals(status.name, "Sprint Complete"))}}#C0FFDF{{/}}
{{#if(equals(status.name.split(" ").first, "UAT"))}}#C0FFDF{{/}}
{{#if(equals(status.name.split(" ").first, "Done"))}}#C0FFDF{{/}}
">{{status.name}}</td>
<td>{{fixVersions.name}}</td>
<td><a href="{{epic.url}}">{{epic.key}}</a> {{epic.summary}}</td>
</tr>
{{/}}
</table>
Hi @Pawan Choure -- Welcome to the Atlassian Community!
Such HTML features are apparently not supported, and you could submit a suggestion for Atlassian to add them. When I checked I did not find any open suggestions for this idea in the public backlog.
I remember trying this same thing a while ago, and I just tried again and confirmed your results for Jira Cloud's automation rules.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When I create a normal table with formatting it works only when I use lookupIssues formatting doesn't work isn't that strange.
Is there any way to view the result of the HTML generated page in JIRA automation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For your use case of creating a formatted email, the only way I can think of is to instead set that body text to a different plain text, custom field, and then export to see what happens.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.