Commit d9d338c7 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch '327120-add-invite-source-tracking-6' into 'master'

Fix members invite page source telemetry value

See merge request gitlab-org/gitlab!63906
parents 2b6e5fdf 64a5c411
......@@ -6,7 +6,7 @@ module MembershipActions
def create
create_params = params.permit(:user_ids, :access_level, :expires_at)
result = Members::CreateService.new(current_user, create_params.merge({ source: membershipable, invite_source: "#{source_type}-members-page" })).execute
result = Members::CreateService.new(current_user, create_params.merge({ source: membershipable, invite_source: "#{plain_source_type}-members-page" })).execute
if result[:status] == :success
redirect_to members_page_url, notice: _('Users were successfully added.')
......@@ -175,6 +175,10 @@ module MembershipActions
end
end
def plain_source_type
raise NotImplementedError
end
def requested_relations
case params[:with_inherited_permissions].presence
when 'exclude'
......
......@@ -78,6 +78,10 @@ class Groups::GroupMembersController < Groups::ApplicationController
def membershipable_members
group.members
end
def plain_source_type
'group'
end
end
Groups::GroupMembersController.prepend_mod_with('Groups::GroupMembersController')
......@@ -62,6 +62,10 @@ class Projects::ProjectMembersController < Projects::ApplicationController
def membershipable_members
project.members
end
def plain_source_type
'project'
end
end
Projects::ProjectMembersController.prepend_mod_with('Projects::ProjectMembersController')
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