Commit a464f2cc authored by Felipe Artur's avatar Felipe Artur

Scope save_issuable_health_status flag to group

Scope save_issuable_health_status feature flag to
group on backend and remove it from GraphQL
parent ac4c5ded
......@@ -2548,7 +2548,7 @@ type EpicIssue implements Noteable {
epicIssueId: ID!
"""
Current health status. Available only when feature flag `save_issuable_health_status` is enabled
Current health status. Returns null if `save_issuable_health_status` feature flag is disabled.
"""
healthStatus: HealthStatus
......@@ -3539,7 +3539,7 @@ type Issue implements Noteable {
epic: Epic
"""
Current health status. Available only when feature flag `save_issuable_health_status` is enabled
Current health status. Returns null if `save_issuable_health_status` feature flag is disabled.
"""
healthStatus: HealthStatus
......
......@@ -7397,7 +7397,7 @@
},
{
"name": "healthStatus",
"description": "Current health status. Available only when feature flag `save_issuable_health_status` is enabled",
"description": "Current health status. Returns null if `save_issuable_health_status` feature flag is disabled.",
"args": [
],
......@@ -10125,7 +10125,7 @@
},
{
"name": "healthStatus",
"description": "Current health status. Available only when feature flag `save_issuable_health_status` is enabled",
"description": "Current health status. Returns null if `save_issuable_health_status` feature flag is disabled.",
"args": [
],
......
......@@ -419,7 +419,7 @@ Relationship between an epic and an issue
| `dueDate` | Time | Due date of the issue |
| `epic` | Epic | Epic to which this issue belongs |
| `epicIssueId` | ID! | ID of the epic-issue relation |
| `healthStatus` | HealthStatus | Current health status. Available only when feature flag `save_issuable_health_status` is enabled |
| `healthStatus` | HealthStatus | Current health status. Returns null if `save_issuable_health_status` feature flag is disabled. |
| `id` | ID | Global ID of the epic-issue relation |
| `iid` | ID! | Internal ID of the issue |
| `milestone` | Milestone | Milestone of the issue |
......@@ -540,7 +540,7 @@ Autogenerated return type of EpicTreeReorder
| `downvotes` | Int! | Number of downvotes the issue has received |
| `dueDate` | Time | Due date of the issue |
| `epic` | Epic | Epic to which this issue belongs |
| `healthStatus` | HealthStatus | Current health status. Available only when feature flag `save_issuable_health_status` is enabled |
| `healthStatus` | HealthStatus | Current health status. Returns null if `save_issuable_health_status` feature flag is disabled. |
| `iid` | ID! | Internal ID of the issue |
| `milestone` | Milestone | Milestone of the issue |
| `reference` | String! | Internal reference of the issue. Returned in shortened format by default |
......
......@@ -24,8 +24,8 @@ module EE
field :health_status,
::Types::HealthStatusEnum,
null: true,
description: 'Current health status',
feature_flag: :save_issuable_health_status
description: 'Current health status. Returns null if `save_issuable_health_status` feature flag is disabled.',
resolve: -> (obj, _, _) { obj.supports_health_status? ? obj.health_status : nil }
end
end
end
......
......@@ -14,7 +14,8 @@ module HealthStatus
override :supports_health_status?
def supports_health_status?
resource_parent.feature_available?(:issuable_health_status) &&
::Feature.enabled?(:save_issuable_health_status, resource_parent)
return false unless resource_parent&.feature_available?(:issuable_health_status)
::Feature.enabled?(:save_issuable_health_status, resource_parent.try(:group))
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