Allow subgroups look for Insights configuration from the parent group

For now the group will only look for itself for the configuration file, but it should also look at the parents if there's a parent group.

This will be done in ee/app/models/concerns/insights_feature.rb. Here's the concept:

diff --git a/ee/app/models/concerns/insights_feature.rb b/ee/app/models/concerns/insights_feature.rb
index b370a0d141b..b83907c2c45 100644
--- a/ee/app/models/concerns/insights_feature.rb
+++ b/ee/app/models/concerns/insights_feature.rb
@@ -16,6 +16,8 @@ module InsightsFeature
       # When there's a config file, we use it regardless it's valid or not
       if insight&.project&.project_insights_config_yaml
         insight.project.insights_config(follow_group: false)
+      elsif parent
+        parent.insights_config
       else # When there's nothing, then we use the default
         default_insights_config
       end
Assignee Loading
Time tracking Loading