I have about 4 or 5 tables that are rendered in an automated email. The tables are based on status. Everything works perfectly except the Status for Done. That table does not render correctly. I pulled the code and ran it using the status id for Done and then ran the exact same code with the id for To Do.
When I changed it to the To Do status id the table rendered correctly. With the same code using the id for Done it does not render correctly. I know I have the correct id because I put the field in the table.
Any thoughts why Done renders incorrectly but the other tables work fine?
Hi @Tom Scoggin
Looking at what you have posted, I wonder: are you doing this in an Automation for Jira rule or by some other automation mechanism?
And, are you using Jira Cloud, not the Server or Data Center versions?
If so, I recall a conversation with Atlassian Support from a couple of years ago that the {{issues}} smart value is not supported for Cloud, only for Server / Data Center versions. The context of that support call was why not all fields / data were supported in {{issues}}...it is because it is a coincidence / accident the smart value is visible in Cloud, but the contents are not defined / documented for Cloud.
Instead either Lookup Issues or a web request response message are used for bulk-handling of issue data.
Kind regards,
Bill
@Tom Scoggin Can you share what you are using to render the tables in your automation? Can you share a screenshot as well?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is the code. As you can see I'm having trouble keeping each table format consistent in the email.
<style>
tbody, th, td {
border:1px solid black;
border-collapse:collapse;
}
</style>
<br>
To Do<br>
<br>
<table>
<tbody>
<tr>
<th Style="width:80px">Issue Type</th>
<th Style="width:80px">Issue Key</th>
<th Style="width:125px">Title</th>
<th Style="width:90px">Created</th>
<th Style="width:90px">Updated</th>
<th Style="width:180px">Status</th>
<th Style="width:50px">Unit</th>
<th Style="width:400px">Last Comment</th>
<th Style="width:75px">Days Since Last Update</th>
</tr>
{{#issues}}
{{#if (status.id.eq(10000))}}
<tr>
<td>{{issueType.name}}</td>
<td>{{key}}</td>
<td>{{summary}}</td>
<td>{{created.format("MM/dd/yyyy")}}</td>
<td>{{updated.format("MM/dd/yyyy")}}</td>
<td>{{status.name}}</td>
<td>{{CPT}}</td>
<td>{{comments.last.body}}</td>
<td>{{updated.diff(now).days.abs}}</td>
</tr>
{{/}}
{{/}}
</tbody>
</table>
<br>
In Progress Table<br>
<br>
<table>
<tbody>
<tr>
<th Style="width:80px">Issue Type</th>
<th Style="width:80px">Issue Key</th>
<th Style="width:125px">Title</th>
<th Style="width:90px">Created</th>
<th Style="width:90px">Updated</th>
<th Style="width:180px">Status</th>
<th Style="width:50px">Unit</th>
<th Style="width:400px">Last Comment</th>
<th Style="width:75px">Days Since Last Update</th>
</tr>
{{#issues}}
{{#if (status.id.eq(3))}}
<tr>
<td>{{issueType.name}}</td>
<td>{{key}}</td>
<td>{{summary}}</td>
<td>{{created.format("MM/dd/yyyy")}}</td>
<td>{{updated.format("MM/dd/yyyy")}}</td>
<td>{{status.name}}</td>
<td>{{CPT}}</td>
<td>{{comments.last.body}}</td>
<td>{{updated.diff(now).days.abs}}</td>
</tr>
{{/}}
{{/}}
</tbody>
</table>
<br>
Pending External Action<br>
<br>
<table>
<tbody>
<tr>
<th Style="width:80px">Issue Type</th>
<th Style="width:80px">Issue Key</th>
<th Style="width:125px">Title</th>
<th Style="width:90px">Created</th>
<th Style="width:90px">Updated</th>
<th Style="width:180px">Status</th>
<th Style="width:50px">Unit</th>
<th Style="width:400px">Last Comment</th>
<th Style="width:75px">Days Since Last Update</th>
</tr>
{{#issues}}
{{#if (status.id.eq(12737))}}
<tr>
<td>{{issueType.name}}</td>
<td>{{key}}</td>
<td>{{summary}}</td>
<td>{{created.format("MM/dd/yyyy")}}</td>
<td>{{updated.format("MM/dd/yyyy")}}</td>
<td>{{status.name}}</td>
<td>{{CPT}}</td>
<td>{{comments.last.body}}</td>
<td>{{updated.diff(now).days.abs}}</td>
</tr>
{{/}}
{{/}}
</tbody>
</table>
<br>
Awaiting Parts<br>
<br>
<table>
<tbody>
<tr>
<th Style="width:80px">Issue Type</th>
<th Style="width:80px">Issue Key</th>
<th Style="width:125px">Title</th>
<th Style="width:90px">Created</th>
<th Style="width:90px">Updated</th>
<th Style="width:180px">Status</th>
<th Style="width:50px">Unit</th>
<th Style="width:400px">Last Comment</th>
<th Style="width:75px">Days Since Last Update</th>
</tr>
{{#issues}}
{{#if (status.id.eq(11441))}}
<tr>
<td>{{issueType.name}}</td>
<td>{{key}}</td>
<td>{{summary}}</td>
<td>{{created.format("MM/dd/yyyy")}}</td>
<td>{{updated.format("MM/dd/yyyy")}}</td>
<td>{{status.name}}</td>
<td>{{CPT}}</td>
<td>{{comments.last.body}}</td>
<td>{{updated.diff(now).days.abs}}</td>
</tr>
{{/}}
{{/}}
</tbody>
</table>
<br>
Done<br>
<br>
<table>
<tbody>
<tr>
<th Style="width:80px">Issue Type</th>
<th Style="width:80px">Issue Key</th>
<th Style="width:125px">Title</th>
<th Style="width:90px">Created</th>
<th Style="width:90px">Updated</th>
<th Style="width:180px">Status</th>
<th Style="width:50px">Unit</th>
<th Style="width:400px">Last Comment</th>
<th Style="width:75px">Days Since Last Update</th>
</tr>
{{#issues}}
{{#if (status.id.eq(10001))}}
<tr>
<td>{{issueType.name}}</td>
<td>{{key}}</td>
<td>{{summary}}</td>
<td>{{created.format("MM/dd/yyyy")}}</td>
<td>{{updated.format("MM/dd/yyyy")}}</td>
<td>{{status.name}}</td>
<td>{{CPT}}</td>
<td>{{comments.last.body}}</td>
<td>{{updated.diff(now).days.abs}}</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.
If you use old-school table formatting like this does it work?
<br>
Done<br>
<br>
<table>
<tbody>
<tr>
<th width="80">Issue Type</th>
<th width="80">Issue Key</th>
<th width="125">Title</th>
<th width="90">Created</th>
<th width="90">Updated</th>
<th width="180">Status</th>
<th width="50">Unit</th>
<th width="400">Last Comment</th>
<th width="75">Days Since Last Update</th>
</tr>
{{#issues}}
{{#if (status.id.eq(10001))}}
<tr>
<td width="80">{{issueType.name}}</td>
<td width="80">{{key}}</td>
<td width="125">{{summary}}</td>
<td width="90">{{created.format("MM/dd/yyyy")}}</td>
<td width="90">{{updated.format("MM/dd/yyyy")}}</td>
<td width="180">{{status.name}}</td>
<td width="50">{{CPT}}</td>
<td width="400">{{comments.last.body}}</td>
<td width="75">{{updated.diff(now).days.abs}}</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.
Also what email client are you using? (Outlook, Gmail) I want to try and recreate it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Outlook. I've tried a lot of different things but I'm still getting mixed results. I also went as far as to set <table width="1180">
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I found this article but even when I remove the lastComment field I still don't get a consistent table format.
Strange. I may try to run them independently and see if the emails are consistent.
https://jira.atlassian.com/browse/JRASERVER-65047?src=confmacro
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Tom Scoggin If you open the emails in Gmail does it have the same issue? I know Outlook has always been known for formatting issues with tables.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It must be Outlook. Google mail shows them all the same.
Nice call.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I found some articles about how to try and fix the issue in outlook but it does not always work. If you google you will find them and could try some of the posted solutions.
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.