提交 83510980 编写于 作者: G Grzegorz Bizon

Merge branch 'rails5-flatten' into 'master'

Fix project team members count

Closes #46283

See merge request gitlab-org/gitlab-ce!19195
...@@ -5,14 +5,16 @@ module Projects ...@@ -5,14 +5,16 @@ module Projects
def execute(noteable) def execute(noteable)
@noteable = noteable @noteable = noteable
project_members = sorted(project.team.members)
participants = noteable_owner + participants_in_noteable + all_members + groups + project_members participants = noteable_owner + participants_in_noteable + all_members + groups + project_members
participants.uniq participants.uniq
end end
def project_members
@project_members ||= sorted(project.team.members)
end
def all_members def all_members
count = project.team.members.flatten.count [{ username: "all", name: "All Project and Group Members", count: project_members.count }]
[{ username: "all", name: "All Project and Group Members", count: count }]
end end
end end
end end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册