Sending due date crossed email using lookup issues in jira automation

Sameer Mohamed May 30, 2024

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.

3 answers

1 accepted

0 votes
Answer accepted
Vikrant Yadav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 30, 2024

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 : 

 

Screenshot 2024-05-31 at 11.31.29 AM.png

Vikrant Yadav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 30, 2024

Screenshot 2024-05-31 at 11.34.11 AM.png

Sameer Mohamed May 31, 2024

Thank you @Vikrant Yadav - This works like a charm.

Like Vikrant Yadav likes this
0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 30, 2024

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.

Sameer Mohamed May 31, 2024

Hi @Trudy Claspill 

Thank you for taking time to lend help. You are right after removing "fields" and correcting the closing tag {{/}}. It is working.

Like Vikrant Yadav likes this
0 votes
Gikku
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 30, 2024

@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. 

Sameer Mohamed May 31, 2024

Thanks for this input @Gikku I will try this.

Suggest an answer

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

Atlassian Community Events