Linked Secondary Issues

Hi team,

My team is working on building a dashboard that allows us to visualize everything contained within an epic. The challenge is that some of these epics are linked to other epics, which in turn have their own related stories and secondary issues.

For example, take the epic INICINVEX-122.

This epic has linked issues shown as “associated by”:

  • DEVADQ1-526 – An epic
  • DEVADQ1-530 – A story

The problem is that DEVADQ1-526, being an epic, also contains the following secondary issues:

I’ve tried traversing these links using JavaScript, but I’ve only been able to reach the first level. However, I need to count all stories and bugs, including those nested deeper within related epics.

Is there a way to achieve this?

I’d greatly appreciate your support.

Best regards.

Hi @Diego,

JavaScript calcauted fields can check on fields within a particular issue, but won’t see details of linked issues.
I would recommend another approach with calcauted measures.

1.First, you should import issue links, Epics, and stories with the link “associated by”.
Here is how to do this: Import issue links

2.In the report, you can make calcauted measure to look for directly linked “associated by” issues and for child issues of linked Epics. For the expression, use the function Generate() to collect all related issues (directly linked and children of linked epics) and GetMembersByKeys() to look up linked issues in the issue link dimension and Issue dimensions.
More details on calcauted measures described n the documentation: Calculated measures.

The expression might look like this:

Generate( 
  --make combined set of first and second level linked Epics and Stories
  Distinct([Issue].[Issue].GetMembersByKeys( 
    Generate(
      --look for linked "associated by" work items
      [Associated By Items].[Associated By Items].GetMembersByKeys(
        [Measures].[Issue Associated By Items]),
      IIf(
        --check if linked issue is Epic
        [Issue Type].[Issue Type].GetMemberNameByKey(
          [Associated By Items].CurrentMember.Get('Issue type ID')
        ) = "Epic",
        --for Epic, check on epic key and linked children keys
        Generate(
          {[Issue.Epic].[Epic].GetMemberByKey([Associated By Items].CurrentMember.KEY),
          ChildrenSet(
            [Issue.Epic].[Epic].GetMemberByKey([Associated By Items].CurrentMember.KEY)
          )},
          --show linked
          CAST([Issue.Epic].CurrentHierarchyMember.KEY AS string),
          ','
        ),
        --else only linked issue key
        CAST([Associated By Items].CurrentMember.KEY AS string)
      ),
      ','
    )
  )),
  --represent linked issue key and type separated by line break chr(10)
  [Issue].CurrentMember.KEY || 
  " " || 
  [Issue Type].[Issue Type].GetMemberNameByKey(
    [Issue].CurrentMember.Get('Issue type ID')
  ),
  Chr(10)
)

In this example issue link dimension with associated Epics and stories is named “Associated By Items”. If you have another name for the issue link dimension, update the expression accordingly.

Best,
Zane / support@eazyBI.com

1 Like

Hi @zane.baranovska ,

Thank you very much in advance.

I have tried this new alternative approach, and it worked great at the first level. However, is there a way to get the secondary activities in the linked epic? For example:

The epic INICINVEX-122 has a linked epic, DEVADQ1-526, shown in the last column of the image below:

In jira looks like this:

That epic has within it some secondary activities, which could be stories, bugs, or any other issue type:

I have tried to go through the documentation to check if it is necessary to create a new hierarchy or if something else is needed, but I’m still having the same problem.

I truly appreciate your help in gaining a better understanding of this.
Best Regards.