Commit 14f9744f authored by Doug Stull's avatar Doug Stull

Add changelog and update conditional

- changelog needed for changes like this
- conditional not required
parent c2a30862
---
title: Add distinct user count of secure stage items to usage ping
merge_request: 26194
author:
type: added
......@@ -320,16 +320,14 @@ module EE
user_preferences_group_overview_security_dashboard: count(::User.active.group_view_security_dashboard.where(time_period))
}
SECURE_PRODUCT_TYPES.each_with_object(results) do |(secure_type, type_with_name), response|
response["#{prefix}#{type_with_name}".to_sym] = distinct_count(::Ci::Build.where(name: secure_type).where(time_period), :user_id)
SECURE_PRODUCT_TYPES.each do |secure_type, type_with_name|
results["#{prefix}#{type_with_name}".to_sym] = distinct_count(::Ci::Build.where(name: secure_type).where(time_period), :user_id)
end
# handle license rename https://gitlab.com/gitlab-org/gitlab/issues/8911
combined_license_key = "#{prefix}license_management_jobs".to_sym
license_scan_count = results.delete("#{prefix}license_scanning_jobs".to_sym)
if license_scan_count && results[combined_license_key]
results[combined_license_key] += license_scan_count
end
results
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