Merge pull request #1159 from taigaio/issue/4763/hide-closed-epics-in-user-dashboard

Closed #4763: Hide closed epics in user dashboard
stable
Alejandro 2016-11-15 13:54:24 +01:00 committed by GitHub
commit 1586115771
2 changed files with 26 additions and 16 deletions

View File

@ -103,45 +103,55 @@ class HomeService extends taiga.Service
assignedTo = Immutable.Map()
params = {
params_epics = {
status__is_closed: false
assigned_to: userId
}
params_us = {
params_uss = {
is_closed: false
assigned_to: userId
}
params_epics = {
is_closed: false
params_tasks = {
status__is_closed: false
assigned_to: userId
}
params_issues = {
status__is_closed: false
assigned_to: userId
}
assignedEpicsPromise = @rs.epics.listInAllProjects(params_epics).then (epics) ->
assignedTo = assignedTo.set("epics", epics)
assignedUserStoriesPromise = @rs.userstories.listInAllProjects(params_us).then (userstories) ->
assignedUserStoriesPromise = @rs.userstories.listInAllProjects(params_uss).then (userstories) ->
assignedTo = assignedTo.set("userStories", userstories)
assignedTasksPromise = @rs.tasks.listInAllProjects(params).then (tasks) ->
assignedTasksPromise = @rs.tasks.listInAllProjects(params_tasks).then (tasks) ->
assignedTo = assignedTo.set("tasks", tasks)
assignedIssuesPromise = @rs.issues.listInAllProjects(params).then (issues) ->
assignedIssuesPromise = @rs.issues.listInAllProjects(params_issues).then (issues) ->
assignedTo = assignedTo.set("issues", issues)
params = {
params_epics = {
status__is_closed: false
watchers: userId
}
params_us = {
params_uss = {
is_closed: false
watchers: userId
}
params_epics = {
is_closed: false
params_tasks = {
status__is_closed: false
watchers: userId
}
params_issues = {
status__is_closed: false
watchers: userId
}
@ -150,13 +160,13 @@ class HomeService extends taiga.Service
watchingEpicsPromise = @rs.epics.listInAllProjects(params_epics).then (epics) ->
watching = watching.set("epics", epics)
watchingUserStoriesPromise = @rs.userstories.listInAllProjects(params_us).then (userstories) ->
watchingUserStoriesPromise = @rs.userstories.listInAllProjects(params_uss).then (userstories) ->
watching = watching.set("userStories", userstories)
watchingTasksPromise = @rs.tasks.listInAllProjects(params).then (tasks) ->
watchingTasksPromise = @rs.tasks.listInAllProjects(params_tasks).then (tasks) ->
watching = watching.set("tasks", tasks)
watchingIssuesPromise = @rs.issues.listInAllProjects(params).then (issues) ->
watchingIssuesPromise = @rs.issues.listInAllProjects(params_issues).then (issues) ->
watching = watching.set("issues", issues)
workInProgress = Immutable.Map()

View File

@ -87,7 +87,7 @@ describe "tgHome", ->
mocks.resources.epics.listInAllProjects
.withArgs(sinon.match({
is_closed: false
status__is_closed: false
assigned_to: userId
}))
.promise()
@ -95,7 +95,7 @@ describe "tgHome", ->
mocks.resources.epics.listInAllProjects
.withArgs(sinon.match({
is_closed: false
status__is_closed: false
watchers: userId
}))
.promise()