Commit 83510980 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Merge branch 'rails5-flatten' into 'master'

Fix project team members count

Closes #46283

See merge request gitlab-org/gitlab-ce!19195
parents 1364dd12 8a5ad3ca
......@@ -5,14 +5,16 @@ module Projects
def execute(noteable)
@noteable = noteable
project_members = sorted(project.team.members)
participants = noteable_owner + participants_in_noteable + all_members + groups + project_members
participants.uniq
end
def project_members
@project_members ||= sorted(project.team.members)
end
def all_members
count = project.team.members.flatten.count
[{ username: "all", name: "All Project and Group Members", count: count }]
[{ username: "all", name: "All Project and Group Members", count: project_members.count }]
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment