Hello everyone,
I’m currently trying to create a new report which calculates the Bug Impact Score of each sprint. This metric uses a factor revel with the level of impact (Low -1 , Medium - 3, High - 7) and multiplies this by the number of bugs in each impact level.
The nuance is that I need to calculate this metric with relation to the sprint where the User Story the Bugs are linked to where closed.
I am able to count the number of bugs for each user story in a sprint using this metric:
CASE WHEN
[Sprint].Currentmember.Level.name = "Sprint"
THEN
NonZero(Sum(
Filter(
Descendants([Issue].Currentmember, [Issue].[Issue]),
NOT isEmpty([Issue].CurrentHierarchymember.Get('Bugs'))
AND
DateCompare(
[Issue].CurrentHierarchyMember.Get('Created at'),
[Sprint].CurrentMember.Get('End date')) <= 0
AND
[Measures].[Sprint issues at closing] > 0)
,
-- retrieve Bugs information from Issue property Bugs
Nonzero(Count(
[Issue].CurrentHierarchy.GetLinkedmembers('Bugs')
))
)
)
END
However I need the next step which is to calculate the impact store, and for that I need to get to the impact each bug has.
How can I do this?
Thanks!
Hi,
Can you share more details about the Impact score field in Jira? How exactly do you enter values for each bug?
Is your Jira custom field “Impact score” a numeric Jira custom field or a select-list single choice, or maybe even a simple text field?
Have you imported in eazyBI already and if yes, which selections have you choose for it in the import options page?
If that is a single-select custom field with numeric values and you imported in eazyBI this custom field as new property, you could calculate your measure with the following formula.
CASE WHEN
[Sprint].Currentmember.Level.name = "Sprint"
THEN
NonZero(
--Count(
Sum(
Filter(
Descendants([Issue].Currentmember, [Issue].[Issue]),
NOT isEmpty([Issue].Currentmember.Get('Bugs'))
AND
DateCompare(
[Issue].CurrentHierarchyMember.Get('Created at'),
[Sprint].CurrentMember.Get('End date')) <= 0
AND
[Measures].[Sprint issues at closing] > 0
)
,
-- retrieve Bugs information from Issue property Bugs
Nonzero(Count(
Filter(
[Issue].CurrentHierarchy.GetLinkedmembers('Bugs'),
[Issue].CurrentHierarchyMember.get('Impact Score')="7"
)
)*7
+
Count(
Filter(
[Issue].CurrentHierarchy.GetLinkedmembers('Bugs'),
[Issue].CurrentHierarchyMember.get('Impact Score')="3"
)
)*3
+
Count(
Filter(
[Issue].CurrentHierarchy.GetLinkedmembers('Bugs'),
[Issue].CurrentHierarchyMember.get('Impact Score')="1"
)
)
)
)
)
END
Martins / eazyBI support
1 Like
Hi,
Thank you very much for your reply.
“Impact” is a custom field we created in JIRA. It is a text field, but the way you described your solution might work just by replacing with the text we use.
In the meanwhile I managed to come up with a solution, but it does feel a little bit convoluted.
The final goal was achieved however:
However I used a CASE to achieve the total, then I needed to create a seperate one for each of the impact levels.
This is the formula for the total:
-- annotations.group = Defects
CASE WHEN
[Sprint].Currentmember.Level.name = "Sprint"
THEN
NonZero(Sum(
Filter(
Descendants([Issue].Currentmember, [Issue].[Issue]),
NOT isEmpty([Issue].CurrentHierarchymember.Get('Bugs'))
AND
[Measures].[Sprint issues at closing] > 0
)
,
-- retrieve Bugs information from Issue property Bugs
Nonzero(SUM(
[Issue].[Issue].GetMembersByKeys(
[Issue].CurrentHierarchyMember.get('Bugs')),
CASE [Issue].CurrentMember.get('Impact')
WHEN "(none)" THEN 1
WHEN "Low - no operational impact" THEN 1
WHEN "Medium - operational impact w/ workaround" THEN 3
WHEN "High - operational impact without workaround" THEN 7
END
))
)
)
END
And this is an example for an individual level of impact:
-- annotations.group = Defects
CASE WHEN
[Sprint].Currentmember.Level.name = "Sprint"
THEN
NonZero(Sum(
Filter(
Descendants([Issue].Currentmember, [Issue].[Issue]),
NOT isEmpty([Issue].CurrentHierarchymember.Get('Bugs'))
AND
[Measures].[Sprint issues at closing] > 0
)
,
-- retrieve Bugs information from Issue property Bugs
Nonzero(SUM(
[Issue].[Issue].GetMembersByKeys(
[Issue].CurrentHierarchyMember.get('Bugs')),
CASE [Issue].CurrentMember.get('Impact')
WHEN "Low - no operational impact" THEN 1
END
))
)
)
END
Your formula is for the total, correct?
Can we achieve something similar using only when one measure for each level? I had to create a measure for each option.
1 Like
Hi,
My formula was for Sprint dimension members and it should combine all 3 impact scores in one calculated measure.
Try adjusting my formula with correct “Impact” field values
Martins
1 Like