Hi,
I want to render a table when sending out email in Jira Automation Rule. There should be a border and the table should consist of smart values from the custom fields created in Jira like this:
Heading 1 | Heading 2
Custom field name 1 | {{issue.custom_field_1.value}}
Custom field name 2 | {{issue.custom_field_2.value}}
Thank you.
Hi @Jar Lady ,
try to insert this in content:
<table>
<tbody>
<tr>
<th>Heading 1</th>
<th>Heading 2</th>
</tr>
{{#issues}}
<tr>
<td>Custom field name 1</td>
<td>{{issue.custom_field_1.value}}</td>
</tr>
<tr>
<td>Custom field name 2</td>
<td>{{issue.custom_field_2.value}}</td>
</tr>
{{/}}
</tbody>
</table>
And make sure to untick the - Convert line breaks to HTML
You can add border by adding style in html.
<style>
table,
th,
td {
padding: 10px;
border: 1px solid black;
border-collapse: collapse;
}
</style>
<table>
<tbody>
<tr>
<th>Heading 1</th>
<th>Heading 2</th>
</tr>
{{#issues}}
<tr>
<td>Custom field name 1</td>
<td>{{issue.custom_field_1.value}}</td>
</tr>
<tr>
<td>Custom field name 2</td>
<td>{{issue.custom_field_2.value}}</td>
</tr>
{{/}}
</tbody>
</table>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
May I see the screenshot of your automation and email received. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.