Forums

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

Count of open sub-tasks within the main task

Lakshmi CH
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.
September 28, 2021

Hi Team,

Would it be feasible to display a count of open sub-tasks within the main task? We want to capture complexity based on sub-task count and are looking for the following:

  • Add Sub-Task Count (Numeric) field to be auto-updated based on related sub-tasks (child) with a Status != Closed.

Thanks!

1 answer

1 vote
Nic Brough -Adaptavist-
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.
September 28, 2021

A really simple scripted field could do this in Scriptrunner.

For the basics, just counting the issue's subtasks:

  • add a scripted field to the list of custom fields
  • set the template to numeric
  • set the script to simply
  • return issue.getSubtaskObjects().size()
  • set the searcher to number-range (in the list of custom fields)

You can expand that code to read through the sub-tasks for closed ones

Suggest an answer

Log in or Sign up to answer