Hierarchy levels the same as Epic not working

Hi, we have been using some advanced settings quite successfully to model the Jira Portfolio hierarchy in EazyBi, however we have recently added some new issue types to the hierarchy and one isn’t working as expected.

The new hierarchy from top to bottom is:

  • Initiative
  • Feature, Technical Feature, Discovery activity
  • Epic, Elaboration activity
  • Standard Issues types
  • Standard sub-task

The Discovery activities and Elaboration activity issues types were recently added to Portfolio, and I adjusted the easyBi configuration as to include them at the correct levels of the hierarchy, in my experimentation to try and get this to work, I also added the configuration for the jira.epic_key field, though I’m not sure this is needed.

 [jira.epic_key]
data_type = "string"
check_calculated_value = true
issue_type = ["epic", "elaboration activity"]
update_from_issue_key = "epic_parent_key"

[jira.customfield_16400]
data_type = "string"
check_calculated_value = true
issue_type = ["feature", "technical feature", "discovery activity"]
update_from_issue_key = "epic_key"

[jira.customfield_21581]
data_type = "string"
check_calculated_value = true
issue_type = "initiative"
update_from_issue_key = "customfield_16400"

[[jira.issue_hierarchies]]
name = "Feature"
all_member_name = "All Issues by features"
levels = [
  {name="Feature", key_column="customfield_16400", issue_type=["feature", "technical feature"]},
  {name="Epic", key_column="epic_key", issue_type=["epic", "elaboration activity"]},
  {name="Story", key_column="epic_parent_key"},
  {name="Sub-task", key_column="subtask_key"}
]

[[jira.issue_hierarchies]]
name = "Initiative"
all_member_name = "All Issues by initiative"
levels = [
  {name="Initiative", key_column="customfield_21581", issue_type="initiative"},
  {name="Feature", key_column="customfield_16400", issue_type=["feature", "technical feature", "discovery activity"]},
  {name="Epic", key_column="epic_key", issue_type=["epic", "elaboration activity"]},
  {name="Story", key_column="epic_parent_key"},
  {name="Sub-task", key_column="subtask_key"}
]

The “discovery activity” issue type works fine and appears in the correct location in the hierarchy, but the elaboration activity issues don’t. What happens is that when browsing the “All Issues by initiative” hierarchy, all features that have “elaboration activities” issues linked to a feature appear at the initiative level.

Any assistance would be much appreciated in solving this.

Hi @Stuart

It seems that you have already defined a hierarchy where epic is one of the hierarchy levels. This approach would work if you use the standart story>epic relationship.

In the case, when you need to add more issue types to Epic level in the hierarchy you would need to re-define the Epic level for the hierarchy (as it would now include more than one issue type).

Try this definition (see below) for your new hierarchy.

Martins / eazyBI support

[jira.customfield_inilevel]
name = "Initiative level"
data_type = "string"
update_from_issue_key = "customfield_featlevel"
javascript_code = '''
if (issue.fields.customfield_21581 && (
		(issue.fields.issuetype.name == "Feature")
		||
		(issue.fields.issuetype.name == "Technical Feature")
		||
		(issue.fields.issuetype.name == "Discovery activity")
)){
cf = issue.fields.customfield_21581
if (cf.data) {
issue.fields.customfield_inilevel = cf.data.key;
} else {
issue.fields.customfield_inilevel = cf
}
}
'''

[jira.customfield_featlevel]
name = "Feature level"
data_type = "string"
update_from_issue_key = "customfield_epiclevel"
javascript_code = '''
if (issue.fields.customfield_16400 && 
	(
	(issue.fields.issuetype.name == "Epic")||
	(issue.fields.issuetype.name == "Elaboration activity")
	)
){
cf = issue.fields.customfield_16400
if (cf.data) {
issue.fields.customfield_featlevel = cf.data.key;
} else {
issue.fields.customfield_featlevel = cf
}
}
'''

[jira.customfield_epiclevel]
name = "Epic level"
data_type = "string"
update_from_issue_key = "parent_issue_key"
javascript_code = '''
if (
	(issue.fields.issuetype.name != "Initiative")&&
	(issue.fields.issuetype.name != "Feature") &&
	(issue.fields.issuetype.name != "Technical Feature") &&
	(issue.fields.issuetype.name != "Discovery activity") &&
	(issue.fields.issuetype.name != "Epic") &&
	(issue.fields.issuetype.name != "Elaboration activity")
	)
{
if (issue.fields.customfield_10008)
{
cf = issue.fields.customfield_10008
issue.fields.customfield_epiclevel = cf
}
else if(issue.fields.customfield_16400)
{
cf = issue.fields.customfield_16400
if (cf.data) {
issue.fields.customfield_epiclevel = cf.data.key;
} else {
issue.fields.customfield_epiclevel = cf
}
}
}
'''

[[jira.issue_hierarchies]]
name = "Initiatives"
all_member_name = "All Issues by initiatives"
levels = [
{name="Initiative",key_column="customfield_inilevel",issue_type="Initiative"},
{name="Feature",key_column="customfield_featlevel",issue_type=["Feature", "Technical Feature", "Discovery activity"]},
{name="Epic",key_column="customfield_epiclevel",issue_type=["Epic", "Elaboration activity"]},
{name="Story",key_column="subtask_parent_key"},
{name="Sub-task",key_column="subtask_key"}
]

Thanks, thats working really well. Appreciate the effort you’ve put in here. I don’t think I would have ever come up with that much custom code.

1 Like