Here is the goal of my Automation:
Every Friday, I want to send an email that contains a table listing all issues in the statuses "Compliance Approval", "On Hold", or "Awaiting approval". Each issue should show in a separate row of the table. (I have this working successfully).
Problem:
I am running into problems when I want to include a list of all open subtasks for each of the parent issues in their respective rows. I assume I need to use {{lookupIssues}}, but I cannot figure out how to associate the open subtasks with their parent tickets when adding them to the table.
Here is what the table looks like in the email:
Here is the Automation I made:
And here is the HTML I use to create the table (I left the cell for Open Subtasks blank - that is where I need help):
<style type="text/css">
.tg {border-collapse:collapse;border-spacing:0;}
.tg td{border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px;
overflow:hidden;padding:10px 5px;word-break:normal;text-align:center;} /* Added text-align:center; */
.tg th{border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px;
font-weight:normal;overflow:hidden;padding:10px 5px;word-break:normal;text-align:center;} /* Added text-align:center; */
.tg .tg-582d{background-color:#63B9BE;border-color:inherit;color:#FFF;font-weight:bold;text-align:center;vertical-align:middle}
.tg .tg-0lax{text-align:left;vertical-align:top}
</style>
<table class="tg">
<thead>
<tr>
<th class="tg-582d">Issue Summary</th>
<th class="tg-582d">Date Created</th>
<th class="tg-582d">Issue Status</th>
<th class="tg-582d">Open Subtasks</th>
</tr>
</thead>
{{#lookupIssues}}
<tr>
<td class="tg-c3ow">{{summary}}</td>
<td class="tg-c3ow">{{created.mediumDate}}</td>
<td class="tg-0pky">{{status.name}}</td>
<td class="tg-0pky"> </td>
</tr>
{{/}}
</table>
Hello @Christy Kennedy Welcome.
When I tried to log below, I am getting the open subtasks
{{#lookupIssues}}{{#subtasks}}{{#if(equals(status.name,"To Do"))}}* {{key}} , {{summary}}{{/}}{{/}}{{/}}
Using that I have tried to update your email template but havent tried it. Can you check and let us know..
<table class="tg">
<thead>
<tr>
<th class="tg-582d">Issue Summary</th>
<th class="tg-582d">Date Created</th>
<th class="tg-582d">Issue Status</th>
<th class="tg-582d">Open Subtasks</th>
</tr>
</thead>
{{#lookupIssues}}
<tr>
<td class="tg-c3ow">{{summary}}</td>
<td class="tg-c3ow">{{created.mediumDate}}</td>
<td class="tg-0pky">{{status.name}}</td>
<td class="tg-0pky"> {{#subtasks}}{{#if(equals(status.name,"To Do"))}} *{{key}}{{/}}{{/}}{{/}}</td>
</tr>
{{/}}
</table>
Thanks for the help @Kalyan Sattaluri I implemented this, but am getting the below error:
Error rendering smart-values when executing this rule
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Specifically it says
Mismatched start/end tags: null != in template-[id number]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oops. Please remove one of the closing paranthesis. Can you try below:
<table class="tg">
<thead>
<tr>
<th class="tg-582d">Issue Summary</th>
<th class="tg-582d">Date Created</th>
<th class="tg-582d">Issue Status</th>
<th class="tg-582d">Open Subtasks</th>
</tr>
</thead>
{{#lookupIssues}}
<tr>
<td class="tg-c3ow">{{summary}}</td>
<td class="tg-c3ow">{{created.mediumDate}}</td>
<td class="tg-0pky">{{status.name}}</td>
<td class="tg-0pky"> {{#subtasks}}{{#if(equals(status.name,"To Do"))}} *{{key}}{{/}}{{/}}</td>
</tr>
{{/}}
</table>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks! No errors this time, but the cells in the email table for "Open Subtasks" are just empty :(
I confirmed that there are subtasks in the "To Do" status on this project.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hmm, Can you confirm what is the actual name of the status of Open sub-tasks. We call it as To Do.
Is yours the same or is it different?
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.
I just tested and it seemed to work for me including the email part.
Can you, after your lookup action and Before your email action, put a log action statement with below value and share your audit log screenshot.
{{#lookupIssues}}{{#subtasks}}{{#if(equals(status.name,"To Do"))}}* {{key}} , {{summary}}{{/}}{{/}}{{/}}
Please see my screenshots below:
Below is the email i got with open subtasks listed in my example:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Aha! I changed it to find open subtasks using the resolution field instead. It worked :)
<td class="tg-0pky"> {{#subtasks}}{{#if(equals(resolution, EMPTY))}} *{{key}}{{/}}{{/}}</td>
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.
Awesome. Please consider accepting the solution so others researching in the future can benefit. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.