Calculate Story points and number of Bugs for the linked issues

Hi!
I am new to EasyBI and wasn’t able to find answer in similar topics

I need the report which shows for each Reporter in timeline perspective

  • number of closed issues with type Stories and/or Tasks (I was able to create by applying metric Issues closed),
  • number of issues with type Task linked to those stories (I was able to calculate by creating custom metric - see below)
  • number of bugs that are linked to those closed stories AND to those linked tasks (as a total/sum amount) (was not able to calculate)
  • Total amount of closed Story points assigned for closed Stories ( I was able to calculate by applying metrics Story points closed)
  • Total amount of Story points for the linked Tasks ( was not able to calculate)

I could calculate number of bugs linked to the closed Stories (similar to how I calculate linked tasks) by I don’t understand how to calculate bugs to both closed Stories and linked to them Tasks.

And second problem - how to calculate sum of Story Points for the linked Tasks.

I would appreciate help here.

Custom metric for calculation Tasks linked to closed stories (took from example 4 Issue links and hierarchies)

CASE 
WHEN
  [Issue].CurrentMember.Level.Name = "Issue"
  AND
  [Tasks].Currentmember is [Tasks].Defaultmember
THEN
  Nonzero(Count(
    [Issue].CurrentHierarchy.GetLinkedmembers('Tasks')
  ))
ELSE
  NonZero(Sum(
    Descendants([Tasks].Currentmember, [Tasks].[Tasks]),
    [Measures].[Issues closed]
 ))
END

Clarification of my model of accounting tickets in jira - example:
Story 1 → Task 1, Task 2,
Story 1 → Bug 1. Bug 2
Task 1 → Bug 3,
Task 3 → Bug 4
Story 2 → Bug 5, Bug 6
Stories and Tasks are estimated in Story Points.

Hello,
My apologies for the delayed response. From your question, it looks like you have already solved many of your inquiries.
There is one more report from which you can copy formulas: Stories with Bugs details - Issues - eazyBI Demo Training - eazyBI

For example, you can transform, “Hours spent on linked bugs” to calculate the Story points instead of hours spent:

-- annotations.group = 4 Issue links and hierarchies
CASE 
WHEN
  [Issue].CurrentMember.Level.Name = "Issue"
  AND
  [Tasks].Currentmember is [Tasks].Defaultmember
THEN
  -- retrieve Tasks information from Issue property Tasks
  CASE WHEN
    NOT isEmpty([Issue].CurrentHierarchyMember.Get('Tasks'))
  THEN
    NonZero(SUM(
    [Issue].[Issue].GetMembersByKeys(
      [Issue].CurrentHierarchyMember.get('Tasks')),
      DefaultContext((
        [Measures].[Story Points created],
        [Issue].CurrentMember,
        [Time].CurrentHierarchyMember))
    ))
  END
ELSE
 -- total calculation for any issue, data on Tasks level
  NonZero(SUM(
    Filter(
      Descendants([Tasks].Currentmember, [Tasks].[Tasks]),
      -- filter out Tasks with reference to Issue
      ([Measures].[Issues created],
      [Logged by].Defaultmember, 
      [Time].CurrentHierarchy.Defaultmember) > 0),
    -- search for Bug in Issue dimension, use in a tuple with measure, logged by and time, ignore anything else with DefaultContext    
    DefaultContext((
      [Measures].[Story Points created],
      [Issue].[Issue].GetMemberByKey([Tasks].Currentmember.Key),
      [Time].CurrentHierarchyMember, -- allow selection by Time
      [Tasks].DefaultMember
    ))
 ))
END

best regards,
Gerda // support@eazybi.com

1 Like