Automation rule| To get the count of subtasks that are in DONE status and the total number of subtasks.

Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.

Summary

Get the count of subtasks that are in DONE status and the total number of subtasks when the status is transitioned from any status to DONE. The rule checks and updates the total number of Subtasks and Subtasks in Done status simultaneously.

Environment

Jira cloud

Solution

Trigger: When the Issue transitioned from any status to DONE

Condition:  Issue type equals Sub-task

Action: For JQL query project = XXXXX AND issuetype in (Task,Bug,Story)

                Create variable {{subTotal}} with smart value {issue.sub-tasks.size}
                And: Lookup Issues Search for issues using JQL "Parent Link" = "{issue.key}" AND status = "Done"

               Edit Issue for custom field with smart value {{lookupIssues.size|0 }} AND edit issue for another custom field {{subTotal}}

               

Here are the snippets of the automation rule for reference:


Once the above is completed, Board admins can add the respective custom fields in the card layout from the Board settings to see the count:


Last modified on Jan 9, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.