 
     $scope.changeUserStoriesSelection = ->
         selected = $scope.selectedUserStories = getSelectedUserStories()
-
-        promise = calculateStoryPoints(selected)
-        promise.then (points) ->
-            $scope.selectedStoryPoints = points
+        $scope.selectedStoryPoints = calculateStoryPoints(selected)
 
     $scope.$on("points:loaded", loadUserStories)
     $scope.$on("userstory-form:create", loadUserStories)


    # Signal Handlign
    $scope.$on("sortable:changed", resortUserStories)


BacklogUserStoryModalController = ($scope, $rootScope, $gmOverlay, rs, $gmFlash) ->

            calculateStats()

    calculateStoryPoints = (selectedUserStories) ->
        total = 0

        if not selectedUserStories?
            return 0

        for us in selectedUserStories
            for roleId, pointId of us.points
                pointsValue = $scope.constants.points[pointId].value
                if pointsValue is null
                    pointsValue = 0
                total += pointsValue

        return total

    getSelectedUserStories = ->
        selected = _.filter($scope.unassingedUs, "selected")
