Hi there,
Wondering if anyone can help.
I have an automation to send an email to a specific team member when an issue is moved to a specific status.
I can't for the life of me work out how to output a list of sub tasks with their status in the email using smart tags.
Ideally it will check they exist first so I can then output a heading or skip the heading if there are none.
So far I have the below so assume I can do a loop similar to the comments
<strong>{{initiator.displayName}}</strong> has moved the issue to the status - <strong>{{issue.status.name}}</strong>
<a href="https://engineroom.atlassian.net/browse/{{issue.key}}">{{issue.summary}}</a>
{{#issue.Email Date}}
<strong>Email Date:</strong> {{issue.Email Date}}
{{/}}
<hr />
<h2>Ticket Body</h2>
{{issue.description}}
<hr />
<h2>All Issue Comments</h2>
{{#issue.comments.reverse}}
{{body}}
<em>Comment by: {{author.displayName}} at: {{created.mediumDateTime}}</em>
{{/}}
Hi @joemallion
Please try this, adjusting for the markup you want to use:
subtask information:
{{#issue.subtasks}}
* {{key}} {{status.name}}
{{/}}
If you instead want more control over the content and order, please try the Lookup Issues action with JQL to get the issues, such as:
parent = {{triggerIssue.parent}} ORDER BY Key
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are welcome; glad to help. :^)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bill Sheboy
Sorry to bother you but do you know how to get the subtask summary?
Tried the below but no luck:
{{#issue.subtasks}}
<li><strong>{{key}}</strong> - {{issue.summary}} - {{status.name}}</li>
{{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The {{issue.subtasks}} smart value only contains some of the fields from the subtasks. To get all of the issues fields please try using Lookup Issues with JQL to get the subtasks as I noted above.
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.