Get Aggregate Work Logged on the sub-tasks copied to the Parent issue when it completes using Automation
Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.
Summary
How to get the aggregate Work Logged on the sub-tasks copied to a custom field of the parent issue when the issue is transitioned to Done
Solution
Create an automation rule that updates the Sub-Task issues with the value for the Work Logged and then aggregate all the values and update the Parent issue. The summary of the rule:
![Automation rule to sum up work logged on subtasks and store them in a custom field on parent](https://images.ctfassets.net/zsv3d0ugroxu/6xHQI8NQIUItT8PRVvY1ab/f45162803ed475d79ed0c81d144bd627/Screenshot_2024-05-19_at_11.08.12_PM.png)
The edit issue action of the Sub-Tasks has the below Smart Value added:
1
{{issue.summary}} - {{issue.timespent.divide(60)}}m
![Edit field component in automation rule to update custom field with smart values](https://images.ctfassets.net/zsv3d0ugroxu/3gvywxg7x9sYKuBNcGcDLG/34ceadf9657be0f424eaa5198665a894/Screenshot_2024-05-19_at_11.08.22_PM.png)
The edit issue action of the Parent issue has the below Smart Value added:
1
{{lookupIssues.Encoded URL}}
![Automation rule edit issue component to update custom field with smart value](https://images.ctfassets.net/zsv3d0ugroxu/6g48xSKtwd2E1U8IPS5662/0c618008818b8e87381223a5a3094f6e/Screenshot_2024-05-19_at_11.08.27_PM.png)
The Parent issue is updated as below:
![Same of work log on jira ticket](https://images.ctfassets.net/zsv3d0ugroxu/5p6k4Dw3f2d1alhJRFzOu9/fcf37db62d8296d8e1324a711e8b5868/Screenshot_2024-05-19_at_11.08.41_PM.png)
Was this helpful?