     constructor: (@scope, @rootScope, @gmOverlay, @rs, @gmFlash, @i18next) ->
         super(scope)
 
+    debounceMethods: ->
+        submit = @submit
+        @submit = gm.utils.safeDebounced @scope, 500, submit
+
     initialize: ->
+        @debounceMethods()
         @scope.formOpened = false
         @scope.bulkFormOpened = false
 


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, @rs, @gmFlash, @i18next, @location) ->
        super(scope)

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

    initialize: ->
        @debounceMethods()
        # Local scope variables
        @scope.sprintFormOpened = false

