             $scope.$emit("spinner:stop")
             closeModal()
             $scope.overlay.close()
-            $scope.defered.resolve()
+            $scope.defered.resolve($scope.form)
             $gmFlash.info("The user story has been saved")
 
         promise.then null, (data) ->

            options.user_story = us.id

        promise = $modal.open("task-form", {'task': options})
        promise.then ->
            formatUserStoryTasks()
            calculateStats()


        promise.then ->
            formatUserStoryTasks()
            calculateStats()

    $scope.$on "stats:reload", ->
        calculateStats()
