Commit 7e83ecf9 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch...

Merge branch '5164-default-roadmap_graphql-and-unfiltered_epic_aggregates-feature-flags-to-on' into 'master'

Default :roadmap_graphql and :unfiltered_epic_aggregates feature flags to on

See merge request gitlab-org/gitlab!26919
parents d1513457 10f331dc
......@@ -1988,8 +1988,7 @@ type Epic implements Noteable {
descendantCounts: EpicDescendantCount
"""
Total weight of open and closed issues in the epic and its descendants.
Available only when feature flag `unfiltered_epic_aggregates` is enabled.
Total weight of open and closed issues in the epic and its descendants
"""
descendantWeightSum: EpicDescendantWeights
......
......@@ -5847,7 +5847,7 @@
},
{
"name": "descendantWeightSum",
"description": "Total weight of open and closed issues in the epic and its descendants. Available only when feature flag `unfiltered_epic_aggregates` is enabled.",
"description": "Total weight of open and closed issues in the epic and its descendants",
"args": [
],
......
......@@ -327,7 +327,7 @@ Represents an epic.
| `closedAt` | Time | Timestamp of the epic's closure |
| `createdAt` | Time | Timestamp of the epic's creation |
| `descendantCounts` | EpicDescendantCount | Number of open and closed descendant epics and issues |
| `descendantWeightSum` | EpicDescendantWeights | Total weight of open and closed issues in the epic and its descendants. Available only when feature flag `unfiltered_epic_aggregates` is enabled. |
| `descendantWeightSum` | EpicDescendantWeights | Total weight of open and closed issues in the epic and its descendants |
| `description` | String | Description of the epic |
| `downvotes` | Int! | Number of downvotes the epic has received |
| `dueDate` | Time | Due date of the epic |
......
......@@ -17,8 +17,8 @@ class Groups::EpicsController < Groups::ApplicationController
before_action :verify_group_bulk_edit_enabled!, only: [:bulk_update]
before_action do
push_frontend_feature_flag(:roadmap_graphql, @group)
push_frontend_feature_flag(:unfiltered_epic_aggregates, @group)
push_frontend_feature_flag(:roadmap_graphql, @group, default_enabled: true)
push_frontend_feature_flag(:unfiltered_epic_aggregates, @group, default_enabled: true)
push_frontend_feature_flag(:vue_issuable_epic_sidebar, @group)
end
......
......@@ -10,8 +10,8 @@ module Groups
before_action :check_epics_available!
before_action :persist_roadmap_layout, only: [:show]
before_action do
push_frontend_feature_flag(:roadmap_graphql, @group)
push_frontend_feature_flag(:unfiltered_epic_aggregates, @group)
push_frontend_feature_flag(:roadmap_graphql, @group, default_enabled: true)
push_frontend_feature_flag(:unfiltered_epic_aggregates, @group, default_enabled: true)
push_frontend_feature_flag(:roadmap_buffered_rendering, @group)
push_frontend_feature_flag(:milestones_in_roadmap, @group)
end
......
......@@ -125,7 +125,7 @@ module Types
field :descendant_counts, Types::EpicDescendantCountType, null: true, complexity: 10,
description: 'Number of open and closed descendant epics and issues',
resolve: -> (epic, args, ctx) do
if Feature.enabled?(:unfiltered_epic_aggregates)
if Feature.enabled?(:unfiltered_epic_aggregates, epic.group, default_enabled: true)
Gitlab::Graphql::Aggregations::Epics::LazyEpicAggregate.new(ctx, epic.id, COUNT)
else
Epics::DescendantCountService.new(epic, ctx[:current_user])
......@@ -134,10 +134,11 @@ module Types
field :descendant_weight_sum, Types::EpicDescendantWeightSumType, null: true, complexity: 10,
description: "Total weight of open and closed issues in the epic and its descendants",
feature_flag: :unfiltered_epic_aggregates,
resolve: -> (epic, args, ctx) do
if Feature.enabled?(:unfiltered_epic_aggregates, epic.group, default_enabled: true)
Gitlab::Graphql::Aggregations::Epics::LazyEpicAggregate.new(ctx, epic.id, WEIGHT_SUM)
end
end
field :health_status, Types::EpicHealthStatusType, null: true, complexity: 10,
description: 'Current health status of the epic',
......
---
title: Add Roadmap GraphQL and unfiltered epic aggregates
merge_request: 26919
author:
type: added
......@@ -149,10 +149,10 @@ describe 'Epic aggregates (count and weight)' do
QUERY
end
it 'returns an error' do
it 'returns nil' do
post_graphql(query, current_user: current_user)
expect_graphql_errors_to_include /Field 'descendantWeightSum' doesn't exist on type 'Epic/
expect(subject).to include(a_hash_including('descendantWeightSum' => nil))
end
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