Sub-Task and Sub-Taskless Filter

I’m trying to figure out how to filter a Jira issue count measure for only tickets that engineers actually work on directly, which for us would include mostly sub-tasks, but also issues (only Story/Task/Bug) with no sub-tasks. Suggestions on how to approach this? I would guess it will be a calculated member of the Issue dimension which I would use in Pages maybe?

Thanks,
Ben

Hi, @benej60

Thank you for the question!
Usually, creating a calculated member in Issues dimension is not suggested, as it is a large dimension and it could cause reports performance issues.

One option is to create a calculated measure (in Measures) that iterates through issues, filters out all issues without sub-tasks (in other words, parent issues without subtasks, as well as sub-tasks themselves) and then sums them up.

Sum(
  Filter(
    Descendants(
      [Issue].CurrentMember, [Issue].[Issue]),
       IsEmpty([Issue].CurrentHierarchyMember.get('Sub-task keys'))
    ),
  [Measures].[Issues created]
  )

For getting totals of other measures, use the needed measure instead of Issues created.

If you have a larger data instance or more complex report and iterating through issues is slow, you may consider using JavaScript custom field to precalculate whether the issue is or is not an issue without sub-tasks or a subtask itself. Then you would import this custom field as a dimension (the dimension would contain two values Yes / No) and use as a Page filter for the report.
More about calculated JavaScript custom fields: https://docs.eazybi.com/display/EAZYBIJIRA/JavaScript+calculated+custom+fields

Best,
Ilze / support@eazybi.com

Hi ilze,

How can I filter all the subtasks that come from the stories and not from the tasks?

Hi @Marcelo_Ignacio_Cid1

You may want to import linked issue type dimension Parent Issue type: Issue link field dimensions, see an example of setting for “Parent Fix version” (change name and source dimension name).

Then, in the report, you would select “Parent Issue type” dimension in Pages and select “Stories” - now the report would be created based on issues having parent “Stories”. Additionally, select the “Issue type” dimension in Pages if you need to specify only particular sub-task types.

Best,