diff --git a/app/coffee/modules/kanban/main.coffee b/app/coffee/modules/kanban/main.coffee index c38a5a48..99227d92 100644 --- a/app/coffee/modules/kanban/main.coffee +++ b/app/coffee/modules/kanban/main.coffee @@ -132,7 +132,7 @@ class KanbanController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.Fi status__is_archived: false } - return @rs.userstories.listAll(@scope.projectId, params).then (userstories) => + promise = @rs.userstories.listAll(@scope.projectId, params).then (userstories) => @scope.userstories = userstories usByStatus = _.groupBy(userstories, "status") @@ -166,6 +166,10 @@ class KanbanController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.Fi return userstories + promise.then( => @scope.$broadcast("redraw:wip")) + + return promise + loadUserStoriesForStatus: (ctx, statusId) -> params = { status: statusId } return @rs.userstories.listAll(@scope.projectId, params).then (userstories) => @@ -211,7 +215,7 @@ class KanbanController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.Fi return promise.then (project) => @.fillUsersAndRoles(project.members, project.roles) @.initializeSubscription() - @.loadKanban().then( => @scope.$broadcast("redraw:wip")) + @.loadKanban() ## View Mode methods