Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
6d20e886
Commit
6d20e886
authored
Nov 30, 2020
by
Alishan Ladhani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update snowplow feature flag
To be consistent with ProductAnalytics tracking class
parent
4e0d836e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
lib/gitlab/usage_data.rb
lib/gitlab/usage_data.rb
+1
-1
spec/lib/gitlab/usage_data_spec.rb
spec/lib/gitlab/usage_data_spec.rb
+2
-2
No files found.
lib/gitlab/usage_data.rb
View file @
6d20e886
...
@@ -769,7 +769,7 @@ module Gitlab
...
@@ -769,7 +769,7 @@ module Gitlab
end
end
def
report_snowplow_events?
def
report_snowplow_events?
self_monitoring_project
&&
Feature
.
enabled?
(
:product_analytics
,
self_monitoring_project
)
self_monitoring_project
&&
Feature
.
enabled?
(
:product_analytics
_tracking
,
type: :ops
)
end
end
def
distinct_count_service_desk_enabled_projects
(
time_period
)
def
distinct_count_service_desk_enabled_projects
(
time_period
)
...
...
spec/lib/gitlab/usage_data_spec.rb
View file @
6d20e886
...
@@ -1313,7 +1313,7 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
...
@@ -1313,7 +1313,7 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
context
'and product_analytics FF is enabled for it'
do
context
'and product_analytics FF is enabled for it'
do
before
do
before
do
stub_feature_flags
(
product_analytics
:
project
)
stub_feature_flags
(
product_analytics
_tracking:
true
)
create
(
:product_analytics_event
,
project:
project
,
se_category:
'epics'
,
se_action:
'promote'
)
create
(
:product_analytics_event
,
project:
project
,
se_category:
'epics'
,
se_action:
'promote'
)
create
(
:product_analytics_event
,
project:
project
,
se_category:
'epics'
,
se_action:
'promote'
,
collector_tstamp:
2
.
days
.
ago
)
create
(
:product_analytics_event
,
project:
project
,
se_category:
'epics'
,
se_action:
'promote'
,
collector_tstamp:
2
.
days
.
ago
)
...
@@ -1329,7 +1329,7 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
...
@@ -1329,7 +1329,7 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
context
'and product_analytics FF is disabled'
do
context
'and product_analytics FF is disabled'
do
before
do
before
do
stub_feature_flags
(
product_analytics:
false
)
stub_feature_flags
(
product_analytics
_tracking
:
false
)
end
end
it
'returns an empty hash'
do
it
'returns an empty hash'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment