We are using eazyBI with JIRA. Our Epics have features, and features have user stories.
I need to calculate the number of USs that exist under epics which have specific values that are being selected in the page section.
The filters include the following 2 dimensions: [Target PI] and [Label]
I have written the following measure to check based on selected Target PI but it’s taking ages to execute (I guess it’s because it’s going through all USs in the system):
Count(
Filter(
Descendants([Issue.SAFe].CurrentHierarchyMember, [Issue.SAFe].[User Story]),
[Issue].CurrentHierarchyMember.Parent.Parent.get(‘Target PI’) = [Target PI].CurrentMember.Name
)
)
Is it correct to write it this way? Can you advise how to make this more efficient?
And how can I add a condition to filter the epics so to only those that have Label “XYZ” ?
The formula is generally correct for counting the Stories having the Target PI of grandparent matching the PI from the report context. You are also right that this approach has a significant risk of performance problems.
There are a couple of techniques to make such calculations more efficient. First, it is possible to define a new Javascript calculated custom field that would inherit down the Target PI from the upper level of the hierarchy down to the User stories. This approach is limited to work with the single value custom fields in Jira.
[jira.customfield_cf_inherited]
name = "Target PI Inherited"
data_type = "string"
dimension = true
javascript_code='''
if (issue.fields.customfield_NNNNN ) {
issue.fields.customfield_cf_inherited=issue.fields.customfield_NNNNN
}
'''
update_from_issue_key = "epic_key" ## use the correct id of the upper hierarchy level
You need to use the custom field ID instead of NNNNN and the correct name of the level ID instead of the “epic_key”. Once you import this field as a dimension, the simple filtering in the report pages should do the count (you may also add the Issue type filter in the report).
update_from_issue_key = “epic_key” ## use the correct id of the upper hierarchy level
Error:
JavaScript code raised the following error:
missing ; before statement
Can you please advice what did I do wrong?
My intention is inheriting the customize data on the epic (Commitment Level and Technical Epic) to all children (stories, tasks, sub-tasks)
I tried using the code you provided to inherit Epic Labels, but it didn’t work. When I test with an Issue, I get the labels of the current issue and not the labels related to the parent epic :
This solution cannot be fully visible in the testing form.
The update form issue key process runs after the main data import is completed, so, please run the data import in eazyBI and check the results in the report.