Parallelizing userstories and tag_colors for backlog

stable
Alejandro Alonso 2014-12-23 09:57:38 +01:00
parent 1f4ffeb40c
commit a0f5f8d982
1 changed files with 3 additions and 3 deletions

View File

@ -174,10 +174,10 @@ class BacklogController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.F
@scope.httpParams = @.getUrlFilters()
@rs.userstories.storeQueryParams(@scope.projectId, @scope.httpParams)
promise = @.refreshTagsColors().then =>
return @rs.userstories.listUnassigned(@scope.projectId, @scope.httpParams)
promise = @q.all([@.refreshTagsColors(), @rs.userstories.listUnassigned(@scope.projectId, @scope.httpParams)])
return promise.then (userstories) =>
return promise.then (data) =>
userstories = data[1]
# NOTE: Fix order of USs because the filter orderBy does not work propertly in the partials files
@scope.userstories = _.sortBy(userstories, "backlog_order")