Filtered Epics + Child issues + Sub-tasks Hours

Hi,

My Epics have a country field.
How can I display all Epic + child issues + sub-tasks Hours spent, considering this country criteria which I will use as a page filter?
Note that this country field is not present in child issues, nor the sub-tasks.
Currently when I put country in Rows, Time and Logged by in Pages, I can only see Epic issue Hours spent in the table.

Can you help please?

Best

Hi @MikeS

Thanks for posting your question!
I recommend creating an inherited field dimension (learn more here - JavaScript calculated custom fields).
To do that, you should add the below code in eazyBI advanced settings (Advanced settings for custom fields replacing NNNNN with the ID of your custom field “Country”) and import the custom field “Epic country” into eazyBI

[jira.customfield_NNNNN_e]
name = "Epic Country"
data_type = "string"
dimension = true
update_from_issue_key = "epic_key"
javascript_code = '''
if(issue.fields.customfield_NNNNN ) {
issue.fields.customfield_NNNNN_e = issue.fields.customfield_NNNNN;
}
'''

Once you import your custom field, you can use it as a page filter.
In the screenshot below, you can see that only Epic (ETQ-125) has “France” as a Country, but the new field “Epic Country” applies the same value for Epic children. When selecting the “Hours spent” measure, the Hours are summed up from the Epic and its children.

Best wishes,

Elita from support@eazybi.com

Hi @Elita.Kalane,

Thanks a lot for your time and answer! :+1:
That works perfectly when I have the Epic issue as Row, but I wished to get a step further…

In fact, my goal is to see the Hours spent per Countries in a Pie chart, and if possible be able to drill into Epics and lower levels.
Therefore on Rows I should only have Country, or am I wrong?

I plan to start with 2 filters in Pages: Time and Logged by Team in Pages, i.e. Nov 2023, Team A
In Row, I would have Country
In Column I’d simply select Hours spent measure.
I expect to return by Country, all hours spent on Epics related to this Country + their child issues.

Today, when I set all these, the hours spent only show Epic’s Hours spent, ignoring the child issues, sub-tasks of Epic, and Tasks + sub-tasks.

Can you please help me again :slight_smile: ?

Hi @MikeS

If you’d like to make a pie chart per country, select the dimension “Epic Country” in rows, as I have done in the screenshot below. The shown hours are a summary of Epic and it’s children’s hours.

To visualize, I have also added issues in Rows so you can see how the measure “Hours spent” at Epic level are summed up.
Country field is only filled for Epics (ETQ-125 with France and ETQ-188 with Latvia). With the new field I defined with the JavaScript code I shared previously, I was able to pass down “Country” value from Epics, to their children which allows to use the “Epic Country” dimension and aggregate the hours per Epic country including Epic children hours.

Let me know if this works for you!

Elita from support@eazybi.com

Hi @Elita.Kalane,

That doesn’t work for me :frowning:
I renamed Country by Market(s) which I created from the original field Target Market(s) as you described:


Now when I use Market(s) as Row I’ve got only 1 market, I assume it’s (none):

image


The result is as below:
Since it does not work, I added update_from_issue_key = “epic_key” to the original custom field, and this time it displays the Target Market(s) value for Epics child issues! :slight_smile:


Then I proceeded with the next step, which is to use Target Market(s) as Row to see the result…

(none) displays all Epics, then under (none) are listed the Target Market(s) but only those for which there are logged hours spent at Epic level, ignoring the Epics with child issues with hours spent. When a market is displayed (under (none), each of them only count Epic hours, while all the hours spent are correctly displayed when the market is (none). Also when I click to expand an Epic to see its child issues, it scrolls up to (none) and shows the child issues!!!


Here is my exported definition:, I hope that you still can help me :slight_smile:

{
  "cube_name": "Issues",
  "cube_reports": [ {
     "name": "Test",
     "result_view": "table",
     "definition": {"columns":{"dimensions":[{"name":"Measures","selected_set":["[Measures].[Hours spent]","[Measures].[Issue Market(s)]","[Measures].[Issue Target Market(s)]"],"members":[]}]},"rows":{"dimensions":[{"name":"Target Market(s)","selected_set":["[Target Market(s)].[Target Market(s)].Members"],"members":[],"bookmarked_members":[]},{"name":"Issue","selected_set":["[Issue.Epic].[Epic].Members"],"members":[{"depth":2,"name":"(no epic)","full_name":"[Issue.Epic].[IMS].[(no epic)]","drillable":true,"key":"(no epic)","removed":true}],"bookmarked_members":[]}],"filter_by":{"conditions":[{"expression":["[Measures].[Issue Target Market(s)]"],"operator":"not matches","value":"(none)"},{"expression":["[Measures].[Issue Target Market(s)]"],"operator":"not matches","value":"Any"}]},"nonempty_crossjoin":true},"pages":{"dimensions":[]},"options":{},"view":{"current":"table","maximized":false,"table":{}},"calculated_members":[]}
  } ],
  "calculated_members": [{"name":"Issue Target Market(s)","dimension":"Measures","formula":"[Issue].CurrentHierarchyMember.get('Target Market(s)')","format_string":""},{"name":"Issue Market(s)","dimension":"Measures","formula":"[Issue].CurrentHierarchyMember.get('Market(s)')","format_string":""}]
}

Hi,

Ok I sorted it out to get the Market(s) value display all the markets values. A typo in JS code…
But well, still this solution does not work for me :frowning:

Look, when I count hours by Issue (Issue as dimension in Row), the hours are correct.
image
I get 74h for the month of Oct.

When I count hours by Market(s) (Market(s) as dimension in Row)
image
It includes only Epics related hours spent! And of course I cannot drill in to Epics from the Markets dimension, which I would need to…

Even if I add the Issue dimension with the Market(s) one:


Market(s) is defined as below:

Can someone please help me?