Commit bb141031 authored by Felipe Artur's avatar Felipe Artur

Track epic issues count on usage data

Add epic issues count to
usage ping.
parent bb0819de
---
title: Track epic issue counts on usage ping
merge_request: 50204
author:
type: other
......@@ -192,6 +192,7 @@ module EE
confidential_epics: count(::Epic.confidential),
dependency_list_usages_total: redis_usage_data { ::Gitlab::UsageCounters::DependencyList.usage_totals[:total] },
epics: count(::Epic),
epic_issues: count(::EpicIssue),
feature_flags: count(Operations::FeatureFlag),
geo_nodes: count(::GeoNode),
geo_event_log_max_id: alt_usage_data { Geo::EventLog.maximum(:id) || 0 },
......
......@@ -53,9 +53,12 @@ RSpec.describe Gitlab::UsageData do
create(:status_page_setting, project: projects[0], enabled: true)
create(:status_page_setting, project: projects[1], enabled: false)
# 1 published issue on 1 projects with status page enabled
create(:issue, project: projects[0])
create(:issue, :published, project: projects[0])
issue_1 = create(:issue, project: projects[0])
issue_2 = create(:issue, :published, project: projects[0])
create(:issue, :published, project: projects[1])
create(:epic_issue, issue: issue_2)
create(:epic_issue, issue: issue_1)
end
subject { described_class.data }
......@@ -91,6 +94,7 @@ RSpec.describe Gitlab::UsageData do
dependency_scanning_jobs
epics
epics_deepest_relationship_level
epic_issues
feature_flags
geo_nodes
geo_event_log_max_id
......@@ -126,6 +130,7 @@ RSpec.describe Gitlab::UsageData do
expect(count_data[:status_page_issues]).to eq(1)
expect(count_data[:issues_with_health_status]).to eq(2)
expect(count_data[:projects_jira_issuelist_active]).to eq(1)
expect(count_data[:epic_issues]).to eq(2)
end
it 'has integer value for epic relationship level' do
......
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