Hi Everyone,
I'm trying to send email with Lookupissue function in jira automation.
Lookupissue JQL is able to find the tickets when i hit validate query.
However when i configure the body of the email and run the automation, no issues are listed in the email.
<table>
<tr>
<th>Issue Key</th>
<th>Assignee Name</th>
<th>Due Date</th>
</tr>
{{#lookupIssues}}
<tr>
<td><a href="{{url}}">{{key}}</a></td>
<td>{{fields.assignee.displayName}}</td>
<td>{{fields.due}}</td>
</tr>
{{/lookupIssues}}
</table>
Email body looks empty.
Please help me in creating a table and fetch the issues.
Hi @Sameer Mohamed ,It seems to be an issues in Lookup issue closing tag.
Try below email body , it should work for you.
<table style="border-collapse: collapse; border: 1px solid black;">
<thead>
<tr style="border: 1px solid black;">
<th style="border: 1px solid black;">Issue Key</th>
<th style="border: 1px solid black;">Summary</th>
<th style="border: 1px solid black;">Due Date</th>
<th style="border: 1px solid black;">URL</th>
</tr>
</thead>
<tbody>
{{#lookupIssues}}
<tr>
<td style="border: 1px solid black;">{{key}}</td>
<td style="border: 1px solid black;">{{summary}}</td>
<td style="border: 1px solid black;">{{duedate}}</td>
<td style="border: 1px solid black;">{{url}}</td>
</tr>
{{/}}
</tbody>
</table>
Result :
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.
Hello @Sameer Mohamed
You do not need to preface the fields you want to reference with "fields."
You may also want to look at this older post where there is an answer that provides a sample format.
https://community.atlassian.com/t5/Jira-questions/Project-Automation-Email/qaq-p/1528912
Where that example uses #issues you would use #lookupIssues.
Can you also provide screen images that show your entire rule? Sometimes the lack of data in one step is due to the context in which that step is executing. We can't evaluate that without seeing the whole rule.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for taking time to lend help. You are right after removing "fields" and correcting the closing tag {{/}}. It is working.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Sameer Mohamed The code seems to be correct. You can troubleshoot by printing the '{{lookupIssues}}' to audit log as the step just above the send email action (using 'Log action') and check if the expected Jira issues are listed.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.