Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Smart values in email table

Dan Finn
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 3, 2023

Good afternoon,

I've been trying, but to no avail to use automation to send an email with a table of issue from a query.

Using the Send email component 

The content is:

{{#lookupIssues}}
<table style="border:1px solid black" >
<tr>
<th>Key</th>
<th>Type</th>
<th>Summary</th>
<th>Status</th>
</tr>
<tr>
<td>{{key}}</td>
<td>{{issue.issueType.name}}</td>
<td>{{summary}}</td>
<td>{{issue.status}}</td>
</tr>
</table>
{{/}}

 

This works, but sends an individual table for each item in the list. What I really want is each item in one table

1 answer

1 vote
Alexis Robert
Community Champion
March 3, 2023

Hi @Dan Finn , 

 

your code might not be exactly what's expected, I'm thinking that the "table" tag should be before the "lookupIssues". Something like that works for example : 

 

<table style="border-collapse: collapse" table-layout="fixed" width="100%">
<tr>
<th style="border: 1px solid #000000; background-color : #CDCACA" valign="middle" >Key</th>
<th style="border: 1px solid #000000; background-color: #CDCACA" valign="middle" width="30%">Summary</th>
<th style="border: 1px solid #000000; background-color: #CDCACA" valign="middle" >Reporter</th>
<th style="border: 1px solid #000000; background-color: #CDCACA" valign="middle" >Updated</th></tr>
{{#lookupIssues}}<tr>
<td style="border: 1px solid #000000" valign="middle" align="center">
<a href="{{toUrl}}">{{key}}</a></td>
<td style="border: 1px solid #000000" valign="middle">{{summary}}</td>
<td style="border: 1px solid #000000" valign="middle" align="center">{{assignee.displayName}}</td>
<td style="border: 1px solid #000000" valign="middle" align="center">{{updated.withLocale("fr").asMediumDateTime}}</td>
</tr>{{/}}</table>

 

Let me know if this helps, 

 

--Alexis

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events