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

**URL:** <https://community.eazybi.com/t/building-issue-hierarchy-starting-from-the-custom-field-at-the-initiative-level/14901>\
**Category:** Questions & Answers\
**Created:** [February 2, 2024, 10:44am UTC](https://community.eazybi.com/t/building-issue-hierarchy-starting-from-the-custom-field-at-the-initiative-level/14901 "2024-02-02T10:44:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rajat\_Katyal](https://community.eazybi.com/user_avatar/community.eazybi.com/rajat_katyal/32/11240_2.png) [@Rajat\_Katyal](https://community.eazybi.com/u/Rajat_Katyal)\
**Post date:** [February 2, 2024, 10:44am UTC](https://community.eazybi.com/t/building-issue-hierarchy-starting-from-the-custom-field-at-the-initiative-level/14901/1 "2024-02-02T10:44:06Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Elita.Kalane](https://community.eazybi.com/user_avatar/community.eazybi.com/elita.kalane/32/14957_2.png) [@Elita.Kalane](https://community.eazybi.com/u/Elita.Kalane)\
**Post date:** [February 8, 2024, 11:58am UTC](https://community.eazybi.com/t/building-issue-hierarchy-starting-from-the-custom-field-at-the-initiative-level/14901/2 "2024-02-08T11:58:21Z")

</div>

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](https://docs.eazybi.com/eazybi/data-import/data-from-jira/jira-custom-fields/advanced-settings-for-custom-fields)). You can learn more about Additional issue hierarchies here - [Additional Issue hierarchies](https://docs.eazybi.com/eazybi/data-import/data-from-jira/advanced-data-import-options/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.

```auto
[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”

 ![image](https://community.eazybi.com/uploads/default/original/2X/1/15daa517972e43fe860b415c989db62b89903e16.png)

Best wishes,

Elita from [support@eazybi.com](mailto:support@eazybi.com)

---

<div class="post-metadata">

**Author:** ![Rajat\_Katyal](https://community.eazybi.com/user_avatar/community.eazybi.com/rajat_katyal/32/11240_2.png) [@Rajat\_Katyal](https://community.eazybi.com/u/Rajat_Katyal)\
**Post date:** [March 15, 2024, 12:39pm UTC](https://community.eazybi.com/t/building-issue-hierarchy-starting-from-the-custom-field-at-the-initiative-level/14901/3 "2024-03-15T12:39:29Z")

</div>

Thank you so much. It works. My next challenge is as follows:-  
 → At new custom field level, which is now top in the hierarchy, sum the story points for all the Stories linked to the EPICs–\>Initiatives–\>Custom field level  
Please suggest the best possible optimize way to achieve the same.
