             closed: closed
             percentage: if total then ((closed * 100) / total).toFixed(1) else 0.0
 
-    normalizeMilestones: ->
+    normalizeMilestones: =>
         saveChangedMilestone = =>
             console.log "saveChangedMilestone"
             for item, index in @scope.ml.user_stories


class BacklogMilestoneController extends TaigaBaseController
    @.$inject = ['$scope', '$q', 'resource', '$gmFlash', '$i18next']
    constructor: (@scope, @q, rs, @gmFlash, @i18next) ->
        super(scope)

    initialize: ->
        @scope.editFormOpened = false
        @scope.viewUSs = not @scope.ml.closed
        calculateStats()

    calculateTotalPoints: (us) ->
        total = 0

    constructor: (@scope, @rootScope, @gmOverlay, @rs, @gmFlash, @i18next) ->
        super(scope)

    debounceMethods: ->
        submit = @submit
        @submit = gm.utils.safeDebounced @scope, 500, submit

    initialize: ->
        @debounceMethods()
        @scope.bulkFormOpened = false

        # Load data
