Display live COUNT of Unresolved Sub-tasks on parent issue?

Issue #125 resolved
Will created an issue

Is it possible to display a live COUNT of all Unresolved Sub-tasks on a parent issue? I know I can probably count and display the value during a transition but if a new sub-task is added then this will become out of sync.

I also think I can update the parent field via the sub-tasks workflow during Create (maybe?) but that would mean i would need to do the same when that subtask is resolved.

All my issuetpyes currently follow the same workflow so making all those transition is not desirable. Is there a simple way to accomplish the count?

Comments (2)

  1. Fidel Castro Armario repo owner

    The only way I know it can be done is using twice "Set a field as a function of other fields" post-function in order to set "Number of unresolved subtasks" and "Parent's Number of unresolved subtasks" custom fields.

    You will have to insert both post-functions in different transitions of your workflow. These two post-functions will do actual custom field setting depending on whether the issue is a subtask or a parent issue, i.e., you can use both post-functions in your workflow, even if you are using the same workflow for parent issues and for subtasks. Let's see the configurations:

    CONFIGURATION 1:

    conf-1.png

    Setting rule is:

    (^$)count(filterByResolution(subtasks(), ""))

    CONFIGURATION 2:

    conf-4.png

    (.+)count(filterByResolution(subtasks(%{00041}), ""))

    Note that %{00041} is field code for "Parent's issue key" virtual field.

  2. Log in to comment