Skip to content

Commit

Permalink
add additional priority point metrics, percentages
Browse files Browse the repository at this point in the history
  • Loading branch information
Nauman Shahzad authored and Nauman Shahzad committed Oct 1, 2021
1 parent b76daeb commit 978d07b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions app/managers/report_managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ def create_or_update_report(self, sprint_metrics: List[SprintMetrics]) -> None:
"Bug Tickets": sprint_metric.unpointed_breakdown.unpointed_bugs,
"Priority Points": sprint_metric.priority_breakdown.priority_points,
"Non-Priority Points": sprint_metric.priority_breakdown.non_priority_points,
"Priority Percentage": self._get_priority_point_percentage(
sprint_metric
),
"Non Priority Percentage": self._get_non_priority_point_percentage(
sprint_metric
),
}

self.df = self.df.append(row, ignore_index=True)
Expand Down Expand Up @@ -125,3 +131,17 @@ def _get_four_sprint_completed_average(self, completed: int) -> Optional[str]:

average = (self.df.Completed.iloc[-3:].sum() + completed) / 4
return average

def _get_priority_point_percentage(self, sprint_metric: SprintMetrics) -> str:
fraction = sprint_metric.priority_breakdown.priority_points / (
sprint_metric.commitment + sprint_metric.scope_change
)
percentage = self._format_float_as_percent(fraction)
return percentage

def _get_non_priority_point_percentage(self, sprint_metric: SprintMetrics) -> str:
fraction = sprint_metric.priority_breakdown.non_priority_points / (
sprint_metric.commitment + sprint_metric.scope_change
)
percentage = self._format_float_as_percent(fraction)
return percentage

0 comments on commit 978d07b

Please sign in to comment.