Count closed Sub-tasks where the parent status is in particular status

I’m looking to count all the sub-tasks where the parent issues are in a particular status.

This is the JQL(uses script runner function) that I’m trying to implement in EazyBI

issuefunction in subtasksOf('type = JD AND status = "requirement Complete"') and status = Closed

Above query in JIRA gives me all the sub-tasks which are in the status closed, where the parent is in the status “requirement complete”.

This gives me the parent tickets in a count format. I’m looking for the sub-tasks which are closed under these JDs. Can anyone help?

NonZero(
Count(
Filter(
Descendants([Issue].CurrentHierarchyMember, [Issue].[Issue]), 
[Issue].CurrentHierarchyMember.Get('Status ID') = 12823
AND
[Issue].CurrentHierarchyMember.Get('Issue type ID') = 11900
AND
([Measures].[Issues created])>0
)
    )
      )

This gives me sub-tasks closed from all the parent tickets. How can I filter sub-tasks closed from all the closed parent tickets?

NonZero(
Sum(
Filter(
Descendants([Issue].CurrentHierarchyMember, [Issue].[Issue]), 
(
[Measures].[Issues created],
[Issue Type].[Sub-task],
[Status].[Closed])>0
)
    )
      )

@Sarath

Try importing the link field dimension “Parent status”

See the similar post here:

Martins / eazyBI

1 Like

After I import the “Parent Status”, how do I access?
And “subtask_parent_id” is to be left as is or should we replace with the parent ID?

@Sarath after “Parent status” is defined from advanced settings, open the “import options” page in edit view and switch to “Additional options” tab.
From there select to import “Parent status” field as a dimension.
Later use this new dimension “Parent status” to filter reports by the status of the parent.

Martins / eazyBI

1 Like

Perfect! it is appearing now. Thanks a lot :slight_smile: