From 386d89a435483afc81df1f4681c9613ece60e273 Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Fri, 27 Jun 2014 08:43:32 +0200 Subject: [PATCH] Fixing sprints progress bar in backlog --- app/coffee/modules/common/directives.coffee | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/coffee/modules/common/directives.coffee b/app/coffee/modules/common/directives.coffee index 80994ab5..9972268f 100644 --- a/app/coffee/modules/common/directives.coffee +++ b/app/coffee/modules/common/directives.coffee @@ -51,8 +51,11 @@ SprintProgressBarDirective = -> bindOnce $scope, $attrs.tgSprintProgressbar, (sprint) -> closedPoints = sprint.closed_points totalPoints = sprint.total_points - percentage = Math.round(100 * (closedPoints/totalPoints)) - visual_percentage = Math.round(98 * (closedPoints/totalPoints)) #Visual hack for .current-progress bar + percentage = 0 + percentage = Math.round(100 * (closedPoints/totalPoints)) if totalPoints != 0 + visual_percentage = 0 + #Visual hack for .current-progress bar + visual_percentage = Math.round(98 * (closedPoints/totalPoints)) if totalPoints != 0 renderProgress($el, percentage, visual_percentage) return {link: link}