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
b7cf298e
Commit
b7cf298e
authored
Nov 16, 2020
by
Vitali Tatarintev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide on-call schedules behind a feature flag
Add an `oncall_schedules_ff` feature flag
parent
d5539749
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
2 deletions
+28
-2
ee/app/finders/incident_management/oncall_schedules_finder.rb
...pp/finders/incident_management/oncall_schedules_finder.rb
+2
-1
ee/app/services/incident_management/oncall_schedules/create_service.rb
...es/incident_management/oncall_schedules/create_service.rb
+2
-1
ee/config/feature_flags/development/oncall_schedules_mvc.yml
ee/config/feature_flags/development/oncall_schedules_mvc.yml
+8
-0
ee/spec/finders/incident_management/oncall_schedules_finder_spec.rb
...nders/incident_management/oncall_schedules_finder_spec.rb
+8
-0
ee/spec/services/incident_management/oncall_schedules/create_service_spec.rb
...cident_management/oncall_schedules/create_service_spec.rb
+8
-0
No files found.
ee/app/finders/incident_management/oncall_schedules_finder.rb
View file @
b7cf298e
...
...
@@ -19,7 +19,8 @@ module IncidentManagement
attr_reader
:current_user
,
:project
,
:params
def
available?
project
.
feature_available?
(
:oncall_schedules
)
Feature
.
enabled?
(
:oncall_schedules_mvc
,
project
)
&&
project
.
feature_available?
(
:oncall_schedules
)
end
def
allowed?
...
...
ee/app/services/incident_management/oncall_schedules/create_service.rb
View file @
b7cf298e
...
...
@@ -31,7 +31,8 @@ module IncidentManagement
end
def
available?
project
.
feature_available?
(
:oncall_schedules
)
Feature
.
enabled?
(
:oncall_schedules_mvc
,
project
)
&&
project
.
feature_available?
(
:oncall_schedules
)
end
def
error
(
message
)
...
...
ee/config/feature_flags/development/oncall_schedules_mvc.yml
0 → 100644
View file @
b7cf298e
---
name
:
oncall_schedules_mvc
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/47407
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/283914
milestone
:
'
13.7'
type
:
development
group
:
group::monitor
default_enabled
:
false
ee/spec/finders/incident_management/oncall_schedules_finder_spec.rb
View file @
b7cf298e
...
...
@@ -24,6 +24,14 @@ RSpec.describe IncidentManagement::OncallSchedulesFinder do
it
'returns project on-call schedules'
do
is_expected
.
to
contain_exactly
(
oncall_schedule
)
end
context
'when feature flag is disabled'
do
before
do
stub_feature_flags
(
oncall_schedules_mvc:
false
)
end
it
{
is_expected
.
to
eq
(
IncidentManagement
::
OncallSchedule
.
none
)
}
end
end
context
'when user has no permissions'
do
...
...
ee/spec/services/incident_management/oncall_schedules/create_service_spec.rb
View file @
b7cf298e
...
...
@@ -46,6 +46,14 @@ RSpec.describe IncidentManagement::OncallSchedules::CreateService do
it_behaves_like
'error response'
,
'Your license does not support on-call schedules'
end
context
'when feature flag is disabled'
do
before
do
stub_feature_flags
(
oncall_schedules_mvc:
false
)
end
it_behaves_like
'error response'
,
'Your license does not support on-call schedules'
end
context
'when an on-call schedule already exists'
do
let!
(
:oncall_schedule
)
{
create
(
:incident_management_oncall_schedule
,
project:
project
,
name:
'On-call schedule'
)
}
...
...
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