Fixing sprints progress bar in backlog

stable
Alejandro Alonso 2014-06-27 08:43:32 +02:00
parent ef5b19d3fd
commit 386d89a435
1 changed files with 5 additions and 2 deletions

View File

@ -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}