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
428de648
Commit
428de648
authored
Jun 24, 2021
by
Florie Guibert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up :epic_boards feature flag
Clean up FF, tests and update docs Changelog: other
parent
a9e59d22
Changes
25
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
19 additions
and
205 deletions
+19
-205
app/assets/javascripts/boards/components/board_content.vue
app/assets/javascripts/boards/components/board_content.vue
+9
-5
doc/user/group/epics/epic_boards.md
doc/user/group/epics/epic_boards.md
+0
-19
ee/app/controllers/groups/epic_boards_controller.rb
ee/app/controllers/groups/epic_boards_controller.rb
+1
-4
ee/app/graphql/mutations/boards/epic_boards/epic_move_list.rb
...pp/graphql/mutations/boards/epic_boards/epic_move_list.rb
+0
-4
ee/app/graphql/mutations/boards/epic_boards/update.rb
ee/app/graphql/mutations/boards/epic_boards/update.rb
+0
-4
ee/app/graphql/resolvers/boards/epic_boards_resolver.rb
ee/app/graphql/resolvers/boards/epic_boards_resolver.rb
+0
-1
ee/app/services/boards/epic_boards/create_service.rb
ee/app/services/boards/epic_boards/create_service.rb
+1
-1
ee/app/services/boards/epic_lists/create_service.rb
ee/app/services/boards/epic_lists/create_service.rb
+0
-4
ee/app/services/boards/epic_lists/destroy_service.rb
ee/app/services/boards/epic_lists/destroy_service.rb
+0
-4
ee/app/services/boards/epics/create_service.rb
ee/app/services/boards/epics/create_service.rb
+1
-1
ee/app/views/layouts/nav/ee/_epic_link.html.haml
ee/app/views/layouts/nav/ee/_epic_link.html.haml
+3
-4
ee/config/feature_flags/development/epic_boards.yml
ee/config/feature_flags/development/epic_boards.yml
+0
-8
ee/spec/features/groups/navbar_spec.rb
ee/spec/features/groups/navbar_spec.rb
+0
-22
ee/spec/graphql/mutations/boards/epic_boards/create_spec.rb
ee/spec/graphql/mutations/boards/epic_boards/create_spec.rb
+1
-10
ee/spec/graphql/mutations/boards/epic_boards/epic_move_list_spec.rb
...aphql/mutations/boards/epic_boards/epic_move_list_spec.rb
+0
-1
ee/spec/graphql/mutations/boards/epic_boards/update_spec.rb
ee/spec/graphql/mutations/boards/epic_boards/update_spec.rb
+1
-10
ee/spec/graphql/mutations/boards/epics/create_spec.rb
ee/spec/graphql/mutations/boards/epics/create_spec.rb
+0
-11
ee/spec/graphql/resolvers/boards/epic_boards_resolvers_spec.rb
...ec/graphql/resolvers/boards/epic_boards_resolvers_spec.rb
+0
-10
ee/spec/requests/api/graphql/boards/epic_boards_query_spec.rb
...pec/requests/api/graphql/boards/epic_boards_query_spec.rb
+0
-13
ee/spec/requests/api/graphql/mutations/boards/epic_boards/epic_move_list_spec.rb
...aphql/mutations/boards/epic_boards/epic_move_list_spec.rb
+1
-16
ee/spec/requests/api/graphql/mutations/boards/epics/create_spec.rb
...equests/api/graphql/mutations/boards/epics/create_spec.rb
+0
-1
ee/spec/services/boards/epic_boards/create_service_spec.rb
ee/spec/services/boards/epic_boards/create_service_spec.rb
+1
-17
ee/spec/services/boards/epic_lists/create_service_spec.rb
ee/spec/services/boards/epic_lists/create_service_spec.rb
+0
-13
ee/spec/services/boards/epic_lists/destroy_service_spec.rb
ee/spec/services/boards/epic_lists/destroy_service_spec.rb
+0
-14
ee/spec/services/boards/epics/create_service_spec.rb
ee/spec/services/boards/epics/create_service_spec.rb
+0
-8
No files found.
app/assets/javascripts/boards/components/board_content.vue
View file @
428de648
...
...
@@ -12,10 +12,8 @@ import BoardColumnDeprecated from './board_column_deprecated.vue';
export
default
{
components
:
{
BoardAddNewColumn
,
BoardColumn
:
gon
.
features
?.
graphqlBoardLists
||
gon
.
features
?.
epicBoards
?
BoardColumn
:
BoardColumnDeprecated
,
BoardColumn
,
BoardColumnDeprecated
,
BoardContentSidebar
:
()
=>
import
(
'
~/boards/components/board_content_sidebar.vue
'
),
EpicBoardContentSidebar
:
()
=>
import
(
'
ee_component/boards/components/epic_board_content_sidebar.vue
'
),
...
...
@@ -65,6 +63,11 @@ export default {
return
this
.
canDragColumns
?
options
:
{};
},
boardColumnComponent
()
{
return
this
.
glFeatures
.
graphqlBoardLists
||
this
.
isSwimlanesOn
||
this
.
isEpicBoard
?
BoardColumn
:
BoardColumnDeprecated
;
},
},
methods
:
{
...
mapActions
([
'
moveList
'
,
'
unsetError
'
]),
...
...
@@ -102,7 +105,8 @@ export default {
class=
"boards-list gl-w-full gl-py-5 gl-px-3 gl-white-space-nowrap"
@
end=
"handleDragOnEnd"
>
<board-column
<component
:is=
"boardColumnComponent"
v-for=
"(list, index) in boardListsToUse"
:key=
"index"
ref=
"board"
...
...
doc/user/group/epics/epic_boards.md
View file @
428de648
...
...
@@ -161,22 +161,3 @@ To edit the scope of an epic board:
-
Show or hide the Open and Closed columns.
-
Select other labels as the board's scope.
1.
Select
**Save changes**
.
## Enable or disable epic boards
Epic boards are under development but ready for production use.
It is deployed behind a feature flag that is
**enabled by default**
.
[
GitLab administrators with access to the GitLab Rails console
](
../../../administration/feature_flags.md
)
can disable it.
To disable it:
```
ruby
Feature
.
disable
(
:epic_boards
)
```
To enable it:
```
ruby
Feature
.
enable
(
:epic_boards
)
```
ee/app/controllers/groups/epic_boards_controller.rb
View file @
428de648
...
...
@@ -8,9 +8,6 @@ class Groups::EpicBoardsController < Groups::ApplicationController
before_action
:redirect_to_recent_board
,
only:
[
:index
]
before_action
:assign_endpoint_vars
before_action
do
push_frontend_feature_flag
(
:epic_boards
,
group
,
default_enabled: :yaml
)
end
track_redis_hll_event
:index
,
:show
,
name:
'g_project_management_users_viewing_epic_boards'
...
...
@@ -70,6 +67,6 @@ class Groups::EpicBoardsController < Groups::ApplicationController
end
def
authorize_read_board!
access_denied!
unless
Feature
.
enabled?
(
:epic_boards
,
group
,
default_enabled: :yaml
)
&&
can?
(
current_user
,
:read_epic_board
,
group
)
access_denied!
unless
can?
(
current_user
,
:read_epic_board
,
group
)
end
end
ee/app/graphql/mutations/boards/epic_boards/epic_move_list.rb
View file @
428de648
...
...
@@ -50,10 +50,6 @@ module Mutations
board
=
authorized_find!
(
id:
args
[
:board_id
])
epic
=
authorized_find!
(
id:
args
[
:epic_id
])
unless
Feature
.
enabled?
(
:epic_boards
,
board
.
resource_parent
,
default_enabled: :yaml
)
raise
Gitlab
::
Graphql
::
Errors
::
ResourceNotAvailable
,
'epic_boards feature is disabled'
end
move_epic
(
board
,
epic
,
move_list_arguments
(
args
).
merge
(
board_id:
board
.
id
))
{
...
...
ee/app/graphql/mutations/boards/epic_boards/update.rb
View file @
428de648
...
...
@@ -24,10 +24,6 @@ module Mutations
def
resolve
(
**
args
)
board
=
authorized_find!
(
id:
args
[
:id
])
unless
Feature
.
enabled?
(
:epic_boards
,
board
.
resource_parent
,
default_enabled: :yaml
)
raise
Gitlab
::
Graphql
::
Errors
::
ResourceNotAvailable
,
'epic_boards feature is disabled'
end
::
Boards
::
EpicBoards
::
UpdateService
.
new
(
board
.
resource_parent
,
current_user
,
args
).
execute
(
board
)
{
...
...
ee/app/graphql/resolvers/boards/epic_boards_resolver.rb
View file @
428de648
...
...
@@ -16,7 +16,6 @@ module Resolvers
alias_method
:group
,
:object
def
resolve
(
id:
nil
)
return
unless
Feature
.
enabled?
(
:epic_boards
,
group
,
default_enabled: :yaml
)
return
unless
group
.
licensed_feature_available?
(
:epics
)
authorize!
...
...
ee/app/services/boards/epic_boards/create_service.rb
View file @
428de648
...
...
@@ -8,7 +8,7 @@ module Boards
override
:can_create_board?
def
can_create_board?
Feature
.
enabled?
(
:epic_boards
,
parent
,
default_enabled: :yaml
)
true
end
override
:parent_board_collection
...
...
ee/app/services/boards/epic_lists/create_service.rb
View file @
428de648
...
...
@@ -7,10 +7,6 @@ module Boards
override
:execute
def
execute
(
board
)
unless
Feature
.
enabled?
(
:epic_boards
,
board
.
group
,
default_enabled: :yaml
)
return
ServiceResponse
.
error
(
message:
'Epic boards feature is not enabled.'
)
end
super
end
end
...
...
ee/app/services/boards/epic_lists/destroy_service.rb
View file @
428de648
...
...
@@ -11,10 +11,6 @@ module Boards
return
ServiceResponse
.
error
(
message:
'Epics feature is not available.'
)
end
unless
Feature
.
enabled?
(
:epic_boards
,
list
.
board
.
group
,
default_enabled: :yaml
)
return
ServiceResponse
.
error
(
message:
'Epic boards feature is not enabled.'
)
end
unless
can?
(
current_user
,
:admin_epic_board_list
,
list
)
return
ServiceResponse
.
error
(
message:
'The epic board list that you are attempting to destroy does not '
\
'exist or you don\'t have permission to perform this action'
)
...
...
ee/app/services/boards/epics/create_service.rb
View file @
428de648
...
...
@@ -42,7 +42,7 @@ module Boards
end
def
available?
group
.
licensed_feature_available?
(
:epics
)
&&
Feature
.
enabled?
(
:epic_boards
,
parent
,
default_enabled: :yaml
)
group
.
licensed_feature_available?
(
:epics
)
end
def
allowed?
...
...
ee/app/views/layouts/nav/ee/_epic_link.html.haml
View file @
428de648
...
...
@@ -20,10 +20,9 @@
=
link_to
group_epics_path
(
group
),
title:
'List'
do
%span
=
_
(
'List'
)
-
if
Feature
.
enabled?
(
:epic_boards
,
group
,
default_enabled: :yaml
)
=
nav_link
(
path:
[
'epic_boards#index'
,
'epic_boards#show'
],
html_options:
{
class:
"home"
})
do
=
link_to
group_epic_boards_path
(
group
),
title:
'Boards'
do
%span
=
_
(
'Boards'
)
=
nav_link
(
path:
[
'epic_boards#index'
,
'epic_boards#show'
],
html_options:
{
class:
"home"
})
do
=
link_to
group_epic_boards_path
(
group
),
title:
'Boards'
do
%span
=
_
(
'Boards'
)
=
nav_link
(
path:
'roadmap#show'
,
html_options:
{
class:
'home'
})
do
=
link_to
group_roadmap_path
(
group
),
title:
'Roadmap'
do
...
...
ee/config/feature_flags/development/epic_boards.yml
deleted
100644 → 0
View file @
a9e59d22
---
name
:
epic_boards
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/48893
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/290039
milestone
:
'
13.7'
type
:
development
group
:
group::product planning
default_enabled
:
true
ee/spec/features/groups/navbar_spec.rb
View file @
428de648
...
...
@@ -80,28 +80,6 @@ RSpec.describe 'Group navbar' do
end
context
'when epics are available'
do
before
do
stub_licensed_features
(
epics:
true
)
stub_feature_flags
(
epic_boards:
false
)
insert_after_nav_item
(
_
(
'Group information'
),
new_nav_item:
{
nav_item:
_
(
'Epics'
),
nav_sub_items:
[
_
(
'List'
),
_
(
'Roadmap'
)
]
}
)
visit
group_path
(
group
)
end
it_behaves_like
'verified navigation bar'
end
context
'when epics and epic boards are available'
do
before
do
stub_licensed_features
(
epics:
true
)
...
...
ee/spec/graphql/mutations/boards/epic_boards/create_spec.rb
View file @
428de648
...
...
@@ -27,10 +27,9 @@ RSpec.describe ::Mutations::Boards::EpicBoards::Create do
it
{
is_expected
.
to
have_graphql_fields
(
:epic_board
).
at_least
}
end
context
'with epic feature enabled
and epic_boards feature flag enabled
'
do
context
'with epic feature enabled'
do
before
do
stub_licensed_features
(
epics:
true
)
stub_feature_flags
(
epic_boards:
true
)
end
context
'when user does not have permission to create epic board'
do
...
...
@@ -52,14 +51,6 @@ RSpec.describe ::Mutations::Boards::EpicBoards::Create do
end
end
context
'with epic_boards feature flag disabled'
do
before
do
stub_feature_flags
(
epic_boards:
false
)
end
it_behaves_like
'epic board creation error'
end
context
'with epic feature disabled'
do
before
do
stub_licensed_features
(
epics:
false
)
...
...
ee/spec/graphql/mutations/boards/epic_boards/epic_move_list_spec.rb
View file @
428de648
...
...
@@ -42,7 +42,6 @@ RSpec.describe ::Mutations::Boards::EpicBoards::EpicMoveList do
describe
'#resolve'
do
before
do
stub_licensed_features
(
epics:
true
)
stub_feature_flags
(
epic_boards:
true
)
end
context
'when user does not have permissions'
do
...
...
ee/spec/graphql/mutations/boards/epic_boards/update_spec.rb
View file @
428de648
...
...
@@ -27,10 +27,9 @@ RSpec.describe ::Mutations::Boards::EpicBoards::Update do
it
{
is_expected
.
to
have_graphql_fields
(
:epic_board
).
at_least
}
end
context
'with epic feature enabled
and epic_boards feature flag enabled
'
do
context
'with epic feature enabled'
do
before
do
stub_licensed_features
(
epics:
true
)
stub_feature_flags
(
epic_boards:
true
)
end
context
'when user does not have permission to update epic board'
do
...
...
@@ -50,14 +49,6 @@ RSpec.describe ::Mutations::Boards::EpicBoards::Update do
expect
(
result
[
:epic_board
].
hide_backlog_list
).
to
be_truthy
end
end
context
'with epic_boards feature flag disabled'
do
before
do
stub_feature_flags
(
epic_boards:
false
)
end
it_behaves_like
'epic board update error'
end
end
describe
'#ready?'
do
...
...
ee/spec/graphql/mutations/boards/epics/create_spec.rb
View file @
428de648
...
...
@@ -18,7 +18,6 @@ RSpec.describe Mutations::Boards::Epics::Create do
before
do
stub_licensed_features
(
epics:
true
)
stub_feature_flags
(
epic_boards:
true
)
end
let
(
:mutation
)
{
described_class
.
new
(
object:
nil
,
context:
{
current_user:
user
},
field:
nil
)
}
...
...
@@ -108,16 +107,6 @@ RSpec.describe Mutations::Boards::Epics::Create do
end
end
context
'with epic boards disabled'
do
before
do
stub_feature_flags
(
epic_boards:
false
)
end
it
'returns an error'
do
expect
(
subject
[
:errors
]).
to
include
'This feature is not available'
end
end
context
'with epics not available'
do
before
do
stub_licensed_features
(
epics:
false
)
...
...
ee/spec/graphql/resolvers/boards/epic_boards_resolvers_spec.rb
View file @
428de648
...
...
@@ -46,16 +46,6 @@ RSpec.describe Resolvers::Boards::EpicBoardsResolver do
.
to
contain_exactly
(
epic_board2
,
epic_board1
)
.
and
be_sorted
.
asc
.
by
(
&
:name
)
end
context
'when epic_boards flag is disabled'
do
before
do
stub_feature_flags
(
epic_boards:
false
)
end
it
'returns nil'
do
expect
(
result
).
to
be_nil
end
end
end
end
end
...
...
ee/spec/requests/api/graphql/boards/epic_boards_query_spec.rb
View file @
428de648
...
...
@@ -69,18 +69,5 @@ RSpec.describe 'get list of epic boards' do
expect
(
graphql_data
.
dig
(
'group'
,
'epicBoard'
,
'hideClosedList'
)).
to
eq
board1
.
hide_closed_list
end
end
context
'when epic_boards flag is disabled'
do
before
do
stub_feature_flags
(
epic_boards:
false
)
end
it
'returns nil epic_boards'
do
post_graphql
(
pagination_query
,
current_user:
current_user
)
boards
=
graphql_data
.
dig
(
'group'
,
'epicBoards'
)
expect
(
boards
).
to
be_nil
end
end
end
end
ee/spec/requests/api/graphql/mutations/boards/epic_boards/epic_move_list_spec.rb
View file @
428de648
...
...
@@ -34,24 +34,9 @@ RSpec.describe 'Reposition and move epic between board lists' do
subject
{
post_graphql_mutation
(
mutation
(
params
),
current_user:
current_user
)
}
context
'when epic
_boards are disabled
'
do
context
'when epic
s are available
'
do
before
do
stub_licensed_features
(
epics:
true
)
stub_feature_flags
(
epic_boards:
false
)
group
.
add_developer
(
current_user
)
end
it
'raises feature not available error'
do
subject
expect
(
graphql_errors
).
to
include
(
a_hash_including
(
'message'
=>
'epic_boards feature is disabled'
))
end
end
context
'when epic_boards are enabled'
do
before
do
stub_licensed_features
(
epics:
true
)
stub_feature_flags
(
epic_boards:
true
)
end
context
'when user does not have permissions to admin the board'
do
...
...
ee/spec/requests/api/graphql/mutations/boards/epics/create_spec.rb
View file @
428de648
...
...
@@ -44,7 +44,6 @@ RSpec.describe Mutations::Boards::Epics::Create do
before
do
group
.
add_reporter
(
current_user
)
stub_licensed_features
(
epics:
true
)
stub_feature_flags
(
epic_boards:
true
)
end
context
'when all arguments are given'
do
...
...
ee/spec/services/boards/epic_boards/create_service_spec.rb
View file @
428de648
...
...
@@ -10,24 +10,8 @@ RSpec.describe Boards::EpicBoards::CreateService, services: true do
let_it_be
(
:user
)
{
create
(
:user
)
}
let
(
:parent
)
{
create
(
:group
)
}
let
(
:epic_boards_enabled
)
{
false
}
before
do
stub_feature_flags
(
epic_boards:
epic_boards_enabled
)
end
context
'with epic boards feature not available'
do
it
'does not create a board'
do
service
=
described_class
.
new
(
parent
,
user
)
expect
(
service
.
execute
.
payload
).
not_to
be_nil
expect
{
service
.
execute
}.
not_to
change
(
parent
.
epic_boards
,
:count
)
end
end
context
'with epic boards feature available'
do
let
(
:epic_boards_enabled
)
{
true
}
context
'create epic board'
do
it_behaves_like
'create a board'
,
:epic_boards
it
'tracks epic board creation'
do
...
...
ee/spec/services/boards/epic_lists/create_service_spec.rb
View file @
428de648
...
...
@@ -12,17 +12,4 @@ RSpec.describe Boards::EpicLists::CreateService do
create
(
:epic_list
,
params
.
merge
(
epic_board:
board
))
end
end
context
'when epic_boards feature flag is disabled'
do
before
do
stub_feature_flags
(
epic_boards:
false
)
end
it
'returns an error'
do
response
=
described_class
.
new
(
parent
,
nil
).
execute
(
board
)
expect
(
response
.
success?
).
to
eq
(
false
)
expect
(
response
.
errors
).
to
include
(
"Epic boards feature is not enabled."
)
end
end
end
ee/spec/services/boards/epic_lists/destroy_service_spec.rb
View file @
428de648
...
...
@@ -18,7 +18,6 @@ RSpec.describe Boards::EpicLists::DestroyService do
before
do
stub_licensed_features
(
epics:
true
)
stub_feature_flags
(
epic_boards:
true
)
end
context
'when user does not have permission'
do
...
...
@@ -50,18 +49,5 @@ RSpec.describe Boards::EpicLists::DestroyService do
expect
(
response
.
errors
).
to
include
(
"Epics feature is not available."
)
end
end
context
'when epic_boards feature flag is disabled'
do
before
do
stub_feature_flags
(
epic_boards:
false
)
end
it
'returns an error'
do
response
=
described_class
.
new
(
parent
,
nil
).
execute
(
list
)
expect
(
response
).
to
be_error
expect
(
response
.
errors
).
to
include
(
"Epic boards feature is not enabled."
)
end
end
end
end
ee/spec/services/boards/epics/create_service_spec.rb
View file @
428de648
...
...
@@ -76,13 +76,5 @@ RSpec.describe Boards::Epics::CreateService do
context
'when epics feature is not available'
do
it_behaves_like
'epic creation error'
,
/does not exist or you don't have permission/
end
context
'when epic boards feature flag is not enabled'
do
before
do
stub_feature_flags
(
epic_boards:
false
)
end
it_behaves_like
'epic creation error'
,
/not available/
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