Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
deb32d99
Commit
deb32d99
authored
Aug 27, 2020
by
David O'Regan
Committed by
Heinrich Lee Yu
Aug 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove health status from incidents
Remove the health status feature from incident sidebar.
parent
46164319
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
0 deletions
+47
-0
ee/app/models/concerns/health_status.rb
ee/app/models/concerns/health_status.rb
+1
-0
ee/changelogs/unreleased/229972-remove-health-status-incidents.yml
...logs/unreleased/229972-remove-health-status-incidents.yml
+5
-0
ee/spec/models/concerns/health_status_spec.rb
ee/spec/models/concerns/health_status_spec.rb
+41
-0
No files found.
ee/app/models/concerns/health_status.rb
View file @
deb32d99
...
...
@@ -14,6 +14,7 @@ module HealthStatus
override
:supports_health_status?
def
supports_health_status?
return
false
if
incident?
return
false
unless
resource_parent
&
.
feature_available?
(
:issuable_health_status
)
::
Feature
.
enabled?
(
:save_issuable_health_status
,
resource_parent
.
try
(
:group
),
default_enabled:
true
)
...
...
ee/changelogs/unreleased/229972-remove-health-status-incidents.yml
0 → 100644
View file @
deb32d99
---
title
:
Remove health status feature from incidents
merge_request
:
40520
author
:
type
:
changed
ee/spec/models/concerns/health_status_spec.rb
0 → 100644
View file @
deb32d99
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
HealthStatus
do
describe
'#supports_health_status?'
do
using
RSpec
::
Parameterized
::
TableSyntax
let
(
:project_with_group
)
{
build_stubbed
(
:project
,
group:
group
,
creator:
creator
)
}
let
(
:group
)
{
build_stubbed
(
:group
)
}
let
(
:creator
)
{
build_stubbed
(
:user
)
}
before
do
stub_licensed_features
(
issuable_health_status:
issuable_health_status
)
stub_feature_flags
(
save_issuable_health_status:
save_issuable_health_status
)
end
where
(
:issuable_type
,
:issuable_health_status
,
:save_issuable_health_status
,
:supports_health_status
)
do
:issue
|
true
|
true
|
true
:issue
|
false
|
false
|
false
:issue
|
false
|
true
|
false
:issue
|
true
|
false
|
false
:incident
|
true
|
true
|
false
:incident
|
false
|
false
|
false
:incident
|
false
|
true
|
false
:incident
|
true
|
false
|
false
:merge_request
|
true
|
true
|
false
:merge_request
|
false
|
false
|
false
:merge_request
|
false
|
true
|
false
:merge_request
|
true
|
false
|
false
end
with_them
do
let
(
:issuable
)
{
build_stubbed
(
issuable_type
,
project:
project_with_group
)
}
subject
{
issuable
.
supports_health_status?
}
it
{
is_expected
.
to
eq
(
supports_health_status
)
}
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment