Forums

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

Subtask Smart Tags

joemallion February 24, 2022

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>


{{/}}

 

2 answers

1 accepted

0 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 24, 2022

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

0 votes
joemallion February 25, 2022

Thank you Bill! :) 

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 25, 2022

You are welcome; glad to help.  :^)

joemallion February 28, 2022

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>
{{/}}

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 28, 2022

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.

Suggest an answer

Log in or Sign up to answer