Hi!
We need to count tickets from Project-A which are linked to tickets from Project-C and also those Project-A tickets which are linked to Project-C tickets through third project ticket (ex: A-1 -relates to> X-4 -relates to> C-3). Currently i managed to count only the first level linked issues with:
Sum(
Filter(
Descendants([Issue].CurrentMember,[Issue].[Issue]),
InStr([Issue].CurrentHierarchyMember.Get('Linked Issues'), "C")>0
),
[Measures].[Issues created]
)
In advanced setting we have linked issues defined so:
[jira.customfield_linked_issues]
name = "Linked Issues"
outward_link = ["relates to","blocks"]
inward_link = ["relates to","blocks"]
dimension = true
multiple_values = true
Is there a way to count also the 2nd level linked issues?
Best regard,
Toomas
Hi @toomastahe,
You can update the expression to find also the 2nd-level links (linked issues of linked issues). For the expression, you should use the function GetMembersByKeys() to find linked issues in the dimension “Linked Issues” first and then read which issues are linked to them from the property.
Sum(
--set of issues that have any linked issue
Filter(
DescendantsSet([Issue].CurrentMember,[Issue].[Issue]),
NOT IsEmpty([Issue].CurrentHierarchyMember.Get('Linked Issues'))
),
--numeric expression
CASE WHEN
--check directly linked issue key
InStr([Issue].CurrentHierarchyMember.Get('Linked Issues'),"C") > 0
OR
--check issue key for the 2nd level relation
Count(
Filter(
--look up linked issues in linke issue dimension based on keys in issue property
[Linked Issues].[Linked Issues].GetMembersByKeys(
[Issue].CurrentHierarchyMember.Get('Linked Issues') ),
--for each linke issue check their links
InStr([Linked Issues].CurrentMember.Get('Linked Issues'),"C") > 0
)
) > 0
THEN --if there is a direct or 2nd level link, then count the issue in
NonZero([Measures].[Issues created])
END
)
More details on mentioned functions are described in the documentation:
https://docs.eazybi.com/eazybi/analyze-and-visualize/calculated-measures-and-members/mdx-function-reference
And here is a training account where are few more ideas on how to work with linked issues:
https://eazybi.com/accounts/22010/cubes
Best,
Zane / support@eazyBI.com
Thanks Zane,
This indeed did the trick.
Br,
Toomas
1 Like