Commit ab084438 authored by Alishan Ladhani's avatar Alishan Ladhani

Send event to Product Analytics snowplow collector

parent 65ca5f71
...@@ -34,6 +34,10 @@ module Epics ...@@ -34,6 +34,10 @@ module Epics
::Gitlab::Tracking.event( ::Gitlab::Tracking.event(
'epics', 'promote', property: 'issue_id', value: original_entity.id 'epics', 'promote', property: 'issue_id', value: original_entity.id
) )
::ProductAnalytics::Tracker.event(
'epics', 'promote', property: 'issue_id', value: original_entity.id
)
end end
def create_new_entity def create_new_entity
......
...@@ -60,6 +60,7 @@ RSpec.describe Epics::IssuePromoteService do ...@@ -60,6 +60,7 @@ RSpec.describe Epics::IssuePromoteService do
before do before do
allow(Gitlab::Tracking).to receive(:event).with('epics', 'promote', an_instance_of(Hash)) allow(Gitlab::Tracking).to receive(:event).with('epics', 'promote', an_instance_of(Hash))
allow(ProductAnalytics::Tracker).to receive(:event).with('epics', 'promote', an_instance_of(Hash))
subject.execute(issue) subject.execute(issue)
end end
...@@ -145,6 +146,7 @@ RSpec.describe Epics::IssuePromoteService do ...@@ -145,6 +146,7 @@ RSpec.describe Epics::IssuePromoteService do
context 'when issue has notes' do context 'when issue has notes' do
before do before do
allow(Gitlab::Tracking).to receive(:event).with('epics', 'promote', an_instance_of(Hash)) allow(Gitlab::Tracking).to receive(:event).with('epics', 'promote', an_instance_of(Hash))
allow(ProductAnalytics::Tracker).to receive(:event).with('epics', 'promote', an_instance_of(Hash))
issue.reload issue.reload
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