Is there any smart value to get Sub-task issue summary??

Srikanth Vemuluri November 29, 2022

Hello All,

I want to add sub task summary in a Notification through automation. Do we have any smart values to get the Sub task summary??

2 answers

2 accepted

1 vote
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.
December 1, 2022

Hi @Srikanth Vemuluri 

It is unclear what you mean by "in a notification".

To access the summary of a subtask of the trigger issue, there are at least two ways:

  • use the {{issue.subtasks}} list and list filtering to find the one you want, or get all of them with {{#issue.subtasks}}{{summary}}{{^last}}, {{/}}{{/}}
  • use JQL to find the subtask for that parent issue parent = {{triggerIssue.key}} and issueType = subtask

Kind regards,
Bill

Srikanth Vemuluri December 9, 2022

Hello @Bill Sheboy 

Actually I want to send a notification email using automation rule. In the subject line of the issue I want to add Summary of the Sub task. 

Seems like it will work. But I have a doubt about this Smart value function - {{#issue.subtasks}}{{summary}}{{^last}}, {{/}}{{/}} what to fill in these {{^last}}, {{/}}{{/}}. Can you please provide example??

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.
December 9, 2022

That part is to conditionally add a comma separator between the entries, leaving it off for the last subtask.

If you do not want a separator between the subtasks' summaries you may remove that part, leaving only this, with a single space between entries:

{{#issue.subtasks}}{{summary}} {{/}}

To learn more about smart value list handling, please take a look at this documentation:

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-lists/ 

Like Srikanth Vemuluri likes this
1 vote
Answer accepted
Hamza Chundrigar
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.
November 29, 2022

Hi @Srikanth Vemuluri 

Can you further elaborate on what you mean by adding a subtask summary "in a notification"? 

Do you want to add a summary to the subtask through a parent issue or do you simply want to retrieve the summary of the subtask? If it's the latter, where do you aim to use this summary once you have retrieved it?

Srikanth Vemuluri November 29, 2022

Hello @Hamza Chundrigar 

Thanks for the Quick Response.

I simply want to retrieve summary of the subtask in a Email Subject line in the send email Notification action in the Automations. 

I want subtask summary to reflect in the email subject line. 

Hamza Chundrigar
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.
November 29, 2022

You could build out an automation rule that can run and checks for the condition where Issue Type = subtasks

And then use the smart value to return the subtasks issue summary: 

{{issue.summary}}

I'm not exactly aware of how you choose to trigger the action, but I created a simple automation rule that retrieves the summary of a dummy subtask. Your automation rule might vary but here's the gist of it:

Automation Rule

image.png

 

Here's the Result

image 2.png 

 

Best regards,
Hamza

Hamza Chundrigar
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.
November 29, 2022

Here's a list of Jira Smart Values that you can use: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/

Srikanth Vemuluri November 30, 2022

Hello @Hamza Chundrigar 

Actually my requirement is to Write an automation rule on parent task and then I need a sub task summary in to the parent task. Is it possible to do so??

Suggest an answer

Log in or Sign up to answer