Count the number of subtasks on an issue

We have a project that needs to track the number of subtasks on an issue by subtask type. They would like to see 'counter' fields on the issues that increase everytime a new subtask is added to the issue.

Issue A

Subtask B Counter Subtask C Counter

Subtask type B is added to Issue A - Subtask B Counter increases to 1

Subtask type C is added to Issue A - Subtask C Counter increases to 1

Subtask type A is added to Issue A - Subtask B Counter increases to 2

Any idea on how to get these counters

1 - on create

2 - by subtask type

We are JIRA v6.0.2

1 answer

1 accepted

Hi Jeanne,

You can achieve this by using the great Script Runner plugin by Jamie Echlin (https://marketplace.atlassian.com/plugins/com.onresolve.jira.groovy.groovyrunner).

This plugin comes with the concept of scripted fields - fields that will dynamically get a value based on the scripting code you provide - more information can be found over here: https://jamieechlin.atlassian.net/wiki/display/GRV/Scripted+Fields

Kind regards,

Tom

Suggest an answer

Log in or Join to answer
Community showcase
Pedro Felgueiras
Asked 39m ago in Jira

Clone a Zephyr issue

When I try to clone a Zephyr issue only a popup showing the issue id and nothing more shows.  On the browser console I see:  RTE not registered Error: No jira/editor/registry at c...

9 views 0 0
View question

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot