Multiple issue links in level hierarchy

Hi,
I create an additional hierarchy for my custom issue type “Roadmap Feature”.
I have this hierarchy on practice: “Roadmap feature” ->“Epic”-> “Story”
This is my advanced settings which works fine:
###################################################
#Precalculated custom field with Roadmap Feature key via ScriptRunner
[jira.customfield_20403]
data_type = “string”
check_calculated_value = true
update_from_issue_key = “epic_key”

[[jira.issue_hierarchies]]
name = “Roadmap Feature”
all_member_name = “All Issues by Roadmap Feature”
levels = [
{name=“Roadmap Feature Key”,key_column=“customfield_20403”,issue_type=“Roadmap Feature”},
{name=“Epic”,key_column=“epic_key”},
{name=“Story”,key_column= “epic_parent_key”},
]
###################################################

But I consider the problem with additional issue links. Users are used non-standard issue linking from Epic to Story like “is parent task of:” and “is child task of:” and they were ignored in the report.
How can i fix this problem?

Hi,

It is possible to redefine the way how hierarchy will use the relationship between stories and epics. That will require writing a custom Javascript code to check the links from stories to epics and extract the links to epics also for those stories that are linked by “is child task of:” link.

I used the following advanced settings for such calculation:

[jira.customfield_epic_or_parent]
name="Epic or Parent"
data_type = "string"
dimension = true
javascript_code='''
var links = issue.fields.issuelinks;
for (var i = 0; i < links.length; i++) {
  var link = links[i];
	if (link.type.inward == "has Epic" && link.inwardIssue) {
		issue.fields.customfield_epic_or_parent=link.inwardIssue.key;
		break;
	}
	if (link.type.inward =="is child task of:" && link.inwardIssue) {
		issue.fields.customfield_epic_or_parent=link.inwardIssue.key;
	}
}
'''

Note that this example code will calculate the link for the story by checking if the story has an epic link and take it as a primary, if there will be no epic link, it will look for the “is child task of:” link.

Now the hierarchy definition would be:

[[jira.issue_hierarchies]]
name = "Roadmap Feature"
all_member_name = "All Issues by Initiative"
levels = [
  {name="Roadmap Feature",key_column="customfield_20403",issue_type="Roadmap Feature"},
  {name="Epic",key_column="customfield_epic_or_parent",issue_type="Epic"},
  {name="Story",key_column="parent_issue_key", issue_type="Story"}
]

Kindly,
Janis, eazyBI support

Hi Janis,
image
It’s not work for me.
Any ideas?
Best regards,
Vlad

Vlad,

You should check if the hierarchy is working fine. Here is some advice on how to troubleshoot the hierarchies: https://docs.eazybi.com/eazybijira/data-import/advanced-data-import-options/additional-issue-hierarchies#AdditionalIssuehierarchies-Troubleshooting

Please, apply for the support if still stuck in building the hierarchy. The report you are creating might also be the reason for the error.

Kindly,
Janis, eazyBI support