blob: 7080f388e53e9352d018698066969bf18ad39f04 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# frozen_string_literal: true
module Projects
class ParticipantsService < BaseService
include Users::ParticipableService
def execute(noteable)
@noteable = noteable
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
[{ username: "all", name: "All Project and Group Members", count: project_members.count }]
end
end
end
|