             event.preventDefault()
             event.stopPropagation()
             target = angular.element(event.currentTarget)
+
+            for filter in $scope.filters.statuses
+                if filter.id == issue.status
+                    filter.count--
+
             issue.status = target.data("status-id")
             $el.find(".pop-status").popover().close()
             updateIssueStatus($el, issue, $scope.issueStatusById)
 
             $scope.$apply () ->
                 $repo.save(issue).then
+
+                for filter in $scope.filters.statuses
+                    if filter.id == issue.status
+                        filter.count++
+                $rootscope.$broadcast("filters:issueupdate", $scope.filters)
 
         taiga.bindOnce $scope, "project", (project) ->
             $el.append(selectionTemplate({ 'statuses':  project.issue_statuses }))


    return {link: link}

module.directive("tgIssueStatusInlineEdition", ["$tgRepo", "$tgTemplate", IssueStatusInlineEditionDirective])


#############################################################################

## Issue status Directive (popover for change status)
#############################################################################

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