Building Issue hierarchy starting from the custom field at the Initiative level

We have the issue hierarchy as Initiative->Epic->Story. Using advanced roadmap, we are able to build the issue hierarchy from Initiative to the Story.
We have one Custom field “Objective” (drop-down list) added in the Initiative. Now we want to organize the Issue hierarchal data starting from this custom field as shown below and each EPIC linked to the Initiative should have sum of all the story points for all the Stories linked to the respective EPIC:
–>Objective
----->Initiative
------->Epic 25 (sum of story points entered in the child stories)
------------>Story

Please advise or any other way organizing the data and achieving this goal.

Hi @Rajat_Katyal
Welcome to the eazyBI community!
To build the hierarchy having custom field “Objective” added above your current advanced roadmap hiearchy, please add the below code in eazyBI advanced settings (Advanced settings for custom fields). You can learn more about Additional issue hierarchies here - Additional Issue hierarchies

Make sure you select field “Initative Objectives” for import after you have updated eazyBI advanced settings with the below code and replace “NNNNN” with the ID of your “Objective” custom field.

[jira.customfield_initobj]
name = "Initative Objectives"
data_type = "string"
dimension = true
multiple_values = false
update_from_issue_key = "jpoh_parent_3"
javascript_code = '''
  if(issue.fields.customfield_NNNNN) {
    issue.fields.customfield_initobj = issue.fields.customfield_NNNNN;
}
'''

  
  [[jira.issue_hierarchies]]
   name = "Initiative  Objectives"
   all_member_name = "All Issues by Objectives"
   levels = [
  {name="Initative Objectives",key_column="customfield_initobj"},
  {name="Initative",key_column="jpoh_parent_3",issue_type="Initiative"},
  {name="Epic",key_column="epic_key"},
  {name="Parent",key_column="epic_parent_key"},
  {name="Sub-task",key_column="subtask_key"}
]

You should end up with a similar report where you have a new hierarchy “Initiative Objectives” available under the Issue dimension. “Test 1” in the example below is the value that is entered in Customfield “Objective”

Best wishes,

Elita from support@eazybi.com