 ## Issue status Directive (popover for change status)
 #############################################################################
 
-IssueStatusInlineEditionDirective = ($repo, $template) ->
+IssueStatusInlineEditionDirective = ($repo, $template, $rootscope) ->
     ###
     Print the status of an Issue and a popover to change it.
     - tg-issue-status-inline-edition: The issue

            event.preventDefault()
            event.stopPropagation()
            target = angular.element(event.currentTarget)
            issue.status = target.data("status-id")
            $el.find(".pop-status").popover().close()
            updateIssueStatus($el, issue, $scope.issueStatusById)

            $scope.$apply () ->
                $repo.save(issue).then

        taiga.bindOnce $scope, "project", (project) ->
            $el.append(selectionTemplate({ 'statuses':  project.issue_statuses }))

        $scope.$on "filters:loaded", (ctx, filters) ->
            initializeSelectedFilters(filters)

        $scope.$on "filters:issueupdate", (ctx, filters) ->
            html = template({filters:filters.statuses})
            $el.find(".filter-list").html(html)

        selectQFilter = debounceLeading 100, (value) ->
            return if value is undefined

