Hi Whaleshark,
Welcome to the eazyBI community!
In this case, the code for site advanced settings is more simple, but if you do not have admin access, you can create this field in Jira import options.
Here is how it would look:
You do not have to write anything in additional advanced settings because it is covered by name fields. The JavaScript part is:
var issuelinks = new Array();
//goes through all issue links
if (issue.fields.issuelinks) {
var links = issue.fields.issuelinks;
for (var i = 0; i < links.length; i++) {
var link = links[i];
//looks for outward links "is a key result of" to Epics
if (link.outwardIssue) {
if(link.outwardIssue.fields.issuetype.name && link.outwardIssue.fields.issuetype.name == 'Epic' && link.type.outward == 'is a key result of') {
issuelinks.push(link.outwardIssue.key);
}
}
}
return issuelinks.join(",");
}
A key difference is that a return statement is always required when defining custom fields in Jira import options.
And here you can also test the code with some sample issues before running the import.
Let me know if that works for you or if you have more questions.
Best,
Ilze