Import issue links as dimension

Issue linking in Jira is a powerful option and is widely used. You can import issue links in eazyBI by using advanced settings for custom fields.
In this article, I will try to explain how to set up and import issue links in eazyBI. There can be several use cases on what exactly users want to track in eazyBI with issue links. To demonstrate it, I will take one simple relation: stories with linked bugs.

You can analyze this use case from two perspectives.

  • One is to track Stories and how many Bugs are linked to them;
  • And the opposite - track Bugs and how many Stories are linked to them.

Let’s start with the first situation: a user wants to see Stories with linked Bugs.

When defining the setting for linked issues, you have to keep in mind the general rule: check the link name in the issue screen you consider as a “parent” issue or, in other words, the issue from what perspective you want to analyze linked issues. In this case, if we want to get all bugs created for the story, then we have to check the link name in the story issue screen.

In the print screen above, we can see that the issue link name is “causes”. First, we have to check whether this link name is for inward or the outward endpoint of the link. Keep in mind that the link name could differ accordingly to its direction!
For that, we go to Jira administration “Issue linking” (see screenshot below).
In my example, “causes” is the outward direction:

We define additional calculated custom fields using advanced settings for custom fields. In this case, the settings to import linked bugs to stories look like this:

# Bugs linked to Stories
[jira.customfield_stories_bugs]
name = "Bugs linked to Stories"
outward_link = "causes"
multiple_values = true
dimension = true

If this link type can be used to link different issue type issues (not only bugs), then we can also limit that only linked issues with a specific issue type (“Bug”) will be imported:

# Bugs linked to Stories
[jira.customfield_stories_bugs]
name = "Bugs linked to Stories"
outward_link = "causes"
issue_type = "Bug"
multiple_values = true
dimension = true

You can define several issue types as well:

issue_type = ["Bug", "Incident"]

Not only multiple issue types can be defined, but also several outward or inward links, for example:

outward_link = ["causes", "blocks"]

In some cases, the inward and outward links are used both for the same need and endpoints even may have the same name (i.g. “relates to”), and users use both of them. Then add in the definition both directions:

outward_link = "relates to" 
inward_link = "relates to"

In eazyBI import options, we select “Bugs linked to Stories” to be imported as dimension and issue property. Here is how it looks in eazyBI based on my example from the PrintScreen - DG-173 (story) with its linked bugs.

Now let’s look at the opposite use case - get all Bugs with their linked Stories. Keep in mind the general rule, and let’s go to the Bug issue as it is the “parent” in this case.

As we can see in the PrintScreen - DG-105 (bug) above, the link name is “is caused by” what is an inward direction in my Jira:

We define additional calculated custom fields using advanced settings for custom fields. In this case, my settings look like this:

# Stories linked to Bugs
[jira.customfield_bugs_stories]
name = "Stories linked to Bugs"
inward_link = "is caused by"
multiple_values = true
dimension = true

In eazyBI import options, we select “Stories linked to Bugs” to be imported as dimension and issue property. Here is how it looks in eazyBI based on my example from the PrintScreen - DG-105 (bug) with its linked stories.

Keep in mind - whenever you change the advanced settings for a custom field or hierarchy, it is recommended to either do the full reimport of the data in the account or to clear the previously loaded custom field configuration (run the import with the custom field un-checked) and load it again (run the import with the custom field checked).

See also:

5 Likes

Hi Gerda - this is absolutely helpful. Very useful material. I have one doubt though.
in this script

# Bugs linked to Stories
[jira.customfield_stories_bugs]
name = "Bugs linked to Stories"
outward_link = "causes"
issue_type = "Bug"
multiple_values = true
dimension = true
How do we know that the bugs are linked to Stories? we have given the issue_type as Bug. So Bugs are linked but to which issue type? How does it gets linked only to stories? I could not understand that part. Can you pls help?

HI @THE_STORY_TELLER,
Thank you for the feedback and your question! Glad that you found this useful!
The story part is not defined in the issue link dimension configuration.
If you have the “Issue” dimension in the report, then you can use the “Issue type” in the report to filter by issue type “Story”:

See an example here: Stories with Bugs details - Issues - eazyBI Demo Training - eazyBI

Kind regards,

1 Like

HELP NEEDED…
I have a similar need here but I need to find risks that are linked to Initiatives. I have this hierarchy

Initiative > Epic > Story/Task/Spike/Risk

I have Risks linked to Epics as ‘is a dependency of’. I see from your example above, would I have to create a custom filed like this?

# Risks linked to Initiatives
[jira.customfield_risks_initiatives]
name = "Risks linked to Initiatives"
inward_link = "is a dependency of"
multiple_values = true
dimension = true

I feel like that is not going to transverse epics to initiatives but I think I am getting close.
Thanks
-joe

Hi @joeweiss ,
In case you want to build an Issue hierarchy using issue link dimension, then you cannot use the parameter multiple_values = true as in issue hierarchy there can be only one parent. Also, you will need to have update_from_issue_key parameter.
For issue hierarchies, I suggest checking this documentation where are several examples (one is exactly about adding additional level on top of Epic): Additional Issue hierarchies

best,
Gerda

Hello, is it possible to join link outward and inward?

something like this:

[jira.customfield_Defecto]
name = “Defecto”
outward_link = [“relates to”, “created”]
intward_link = [“relates to”, “created by”]
issue_type = “Defect”
dimension = true
multiple_values = true

Hi @gerda.zandersone ,
I tried import import definition from your example, but got error message
“MDX object ‘[Bugs]’ not found in cube ‘Issues’”
Please provide info for this object. Did you defined it in Advanced Settings?
Thank you,
Boris

Hi @gerda.zandersone

This is very useful as I`ve just been asked to build analysis with linked issues.
What my client wants is a bit different from what you describe I think.

My client would like to see what is the link and what issue is linked.

For example in issue BUG-188134 there are 2 linked issues.
Relates to: BUG-140122
Mentioned in : ABC (confluence link)
image

My client would like to see all this information in eazyBI. Something like this:
image

I understand that the confluence link may not work. This is ok.

As I understand it, to get this, I would need all possible links (from drop down list) as individual Issue Properties. Is this accurate? Is this doable?

The other possible avenue, would be to have Issue Links as a dimension, with all links as siblings in a hierarchy.
Which might result in something like this
image

Is this at all possible?

Thanks,
Marilou

Hi @bmeyerson,
Yes, for the training account the usual export/import report definition won’t work as the name of the issue link dimension can be different thus the formulas won’t work.
The best option, in this case, is to copy one by one the formula from the training account, adjust it so it works for your dimension - meaning change in the formula the dimension “Bugs” to the one you have (e.g. “Bugs linked to Stories”).

best,
Gerda

Hi @Marcelo_Ignacio_Cid1,
Yes, it is possible to use both outward and inward links in one dimension setup, but you just need to test if that works as you expect as it all depends on issue link usage in your Jira.

best,
Gerda

Hi Marilou,
For your use case, there is not an out-of-the-box solution and the best would be if you can write to eazyBI support and we will try to figure out some solution for your use case.

About the Confluence links, it is possible to create a separate dimension to see those links, see an answer here:

best,
Gerda // support@eazyBI.com

1 Like

Thank you @gerda.zandersone , it was helpful

1 Like

Hi @gerda.zandersone ,
Thank you for this useful tool.
When I tried to define a new calculated custome field using the code you pasted above -

[jira.customfield_stories_bugs]
name = "Bugs linked to Stories"
outward_link = "causes"
multiple_values = true
dimension = true

I received the attached message error. What am I doing wrong?

Hi @Gnome
You need to use this code in eazyBI advanced settings and after that it needs to be selected for the import in the eazyBI account data import options:

Keep in mind that eazyBI advanced settings are available only to Jira or eazyBI admins, so please contact them if you don’t have those permissions.
And eazyBI account import options are available to the account owner, user, and data admin.

best,
Gerda

Thanks @gerda.zandersone !
Indeed I don’t have permissions, will ask the admins to import.
Best,

-Noam

Hi @gerda.zandersone
Thank you for these instructions, very useful!
However, I have a question. I have created a custom field as per your suggestion. I have imported it into my account. How can I calculate and provide the number of Issues that were linked to a story?
I am placing Issues on rows and i want to have a number of linked issues next to each parent issue. Is this possible?
Thanks

Osvalda

Hi @Osvalda
Glad to hear that you found this article useful.
If you want to count how many issues are linked to stories, check this eazyBI training account for example measures: Stories with Bugs details - Issues - eazyBI Demo Training - eazyBI

The measure “Linked Bugs count” is the one you are looking for. Copy it and then adjust it and replace dimension name “Bugs” to the issue link dimension you have in your account:

-- annotations.group = 4 Issue links and hierarchies
Case 
When
  [Issue].CurrentMember.Level.Name = "Issue"
  AND
  [Bugs].Currentmember is [Bugs].Defaultmember
Then
  -- retrieve Bugs information from Issue property Bugs
  Nonzero(Count(
    [Issue].CurrentHierarchy.GetLinkedmembers('Bugs')
  ))
Else
 -- total calculation for any issue, data on Bugs level
  NonZero(Sum(
    Descendants([Bugs].Currentmember, [Bugs].[Bugs]),
    -- counts how many times Bugs are reference with issues, this works as a filter as well
    [Measures].[Issues created]
 ))
End

best,
Gerda

1 Like