# Query a field in an epic but from Story

**URL:** <https://community.eazybi.com/t/query-a-field-in-an-epic-but-from-story/13775>\
**Category:** Questions & Answers\
**Tags:** epic-level, javascript, custom-field\
**Created:** [September 21, 2023, 4:12pm UTC](https://community.eazybi.com/t/query-a-field-in-an-epic-but-from-story/13775 "2023-09-21T16:12:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aswinir](https://community.eazybi.com/letter_avatar_proxy/v4/letter/a/977dab/32.png) [@aswinir](https://community.eazybi.com/u/aswinir)\
**Post date:** [September 21, 2023, 4:12pm UTC](https://community.eazybi.com/t/query-a-field-in-an-epic-but-from-story/13775/1 "2023-09-21T16:12:00Z")

</div>

Hi, I have a requirement like this.  
Create an eazybi report with the list of stories whose epics have a particular field value.  
I tried to create a new dimension as below, but can’t seem to find the new dimension created in reports but available in the eazybi account.

[[jira.issue\_link\_field\_dimensions]]  
name = “Epic QBR”  
source\_dimension = “QBR”  
issue\_key\_column = “customfield\_21300”  
group = “Linked issue dimensions”

customfield\_21300 is the field id of that custom field, I tried using issue\_id\_column/issue\_key\_column as well.

Appreciate the help

---

<div class="post-metadata">

**Author:** ![zane.baranovska](https://community.eazybi.com/user_avatar/community.eazybi.com/zane.baranovska/32/7209_2.png) [@zane.baranovska](https://community.eazybi.com/u/zane.baranovska)\
**Post date:** [October 4, 2023, 6:31am UTC](https://community.eazybi.com/t/query-a-field-in-an-epic-but-from-story/13775/2 "2023-10-04T06:31:13Z")

</div>

Hi @aswinir,

Link field dimensions work only for specific issue fields listed in the documentation: [Issue link field dimensions](https://docs.eazybi.com/eazybi/data-import/data-from-jira/advanced-data-import-options/issue-link-field-dimensions#Issuelinkfielddimensions-Overview).

Passing down the custom field “QBR” value from epic to its children so you could filter the report by epic QBR is slightly different.

In this case, you should create a **JavaScript calculated custom field** like below (the code is intended for eazyBI advanced settings):

```auto
[jira. customfield_21300_e]
name = "Epic QBR" 
data_type = "string"
dimension = true
update_from_issue_key = "epic_key"
javascript_code = '''
if(issue.fields. customfield_21300 ) {
   issue.fields. customfield_21300_e = issue.fields. customfield_21300;
}
'''

```

Note this works only for a **single select** custom field. Please see the documentation for more details on this example: [JavaScript calculated custom fields - Inherited field dimension](https://docs.eazybi.com/eazybi/data-import/data-from-jira/jira-custom-fields/javascript-calculated-custom-fields#JavaScriptcalculatedcustomfields-Inheritedfielddimension).

Best,  
Zane / [support@eazyBI.com](mailto:support@eazyBI.com)

---

<div class="post-metadata">

**Author:** ![aswinir](https://community.eazybi.com/letter_avatar_proxy/v4/letter/a/977dab/32.png) [@aswinir](https://community.eazybi.com/u/aswinir)\
**Post date:** [October 4, 2023, 8:10am UTC](https://community.eazybi.com/t/query-a-field-in-an-epic-but-from-story/13775/3 "2023-10-04T08:10:26Z")

</div>

Thanks Zane. I will try this in a while and let you know if any issues
