reload US if the status has changed

stable
Juanfran 2016-02-01 08:41:11 +01:00
parent ec5876a84e
commit f40b9acc92
1 changed files with 4 additions and 0 deletions

View File

@ -94,6 +94,10 @@ class UserStoryDetailController extends mixOf(taiga.Controller, taiga.PageMixin)
initializeEventHandlers: ->
@scope.$on "related-tasks:update", =>
@scope.tasks = _.clone(@scope.tasks, false)
allClosed = _.every @scope.tasks, (task) -> return task.is_closed
if @scope.us.is_closed != allClosed
@.loadUs()
@scope.$on "attachment:create", =>
@analytics.trackEvent("attachment", "create", "create attachment on userstory", 1)