Time to an issue getting a linked issue

HI, I have found this very helpful: Stories by Epics with linked Bugs - Issues - eazyBI Demo Training - eazyBI

But I am after time for an issue before an issue link was created. Eg, how long passed for the Problem before an issue link to a change was connected/created - any ideas?

Hi,

A partial solution to this use case is possible in eazyBI for Jira Cloud, but not possible on Datacenter.

We can create a Javascript calculated custom field and detect from the Issue changelog when a specific issue link was created. However, we are limited to the information present in the changelog history item:

As you can see, we can access the link name and linked issue key, but cannot see the issue type of the linked issue.

So, if you know the link name, the Javascript calculated custom field to find the time since issue creation till the Link creation is the following.

  1. Create a new calculated field:
  2. Add the Javascript like this (adjust line 4 with the link name you are looking for):
var result=0;
for (hist of issue.changelog.histories) {
  for (item of hist.items){
    if (item.field=="Link" && item.toString.match(".*is blocked by.*")) {
      result=Date.parse(hist.created) - Date.parse(issue.fields.created);//timestamps
      break; //find the first link and stop
    }
  }
}
if (result) return result/1000/3600/24; //return days

Select the field for import and reimport the data.
New measures and a property is created giving the time till link creation:

Kindly,
Janis, eazyBI support