Commit cedb39e9 authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch '248908-default-on-graphql-boards-ff' into 'master'

Default on GraphQL boards feature flag [RUN ALL RSPEC] [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!63118
parents 7e36af17 f65e1013
......@@ -159,7 +159,7 @@ export default {
:issuable-type="issuableType"
data-testid="sidebar-due-date"
/>
<board-sidebar-labels-select class="labels" />
<board-sidebar-labels-select class="block labels" />
<sidebar-weight-widget
v-if="weightFeatureAvailable"
:iid="activeBoardItem.iid"
......
......@@ -281,6 +281,7 @@ export class GitLabDropdown {
$target &&
!$target.hasClass('dropdown-menu-close') &&
!$target.hasClass('dropdown-menu-close-icon') &&
!$target.is('use') &&
!$target.data('isLink')
) {
e.stopPropagation();
......
......@@ -7,7 +7,7 @@ class Groups::BoardsController < Groups::ApplicationController
before_action :assign_endpoint_vars
before_action do
push_frontend_feature_flag(:graphql_board_lists, group, default_enabled: false)
push_frontend_feature_flag(:graphql_board_lists, group, default_enabled: :yaml)
push_frontend_feature_flag(:issue_boards_filtered_search, group, default_enabled: :yaml)
push_frontend_feature_flag(:board_multi_select, group, default_enabled: :yaml)
push_frontend_feature_flag(:swimlanes_buffered_rendering, group, default_enabled: :yaml)
......
......@@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/248908
milestone: '13.4'
type: development
group: group::project management
default_enabled: false
default_enabled: true
......@@ -29,7 +29,7 @@ To let your team members organize their own workflows, use
[multiple issue boards](#use-cases-for-multiple-issue-boards). This allows creating multiple issue
boards in the same project.
![GitLab issue board - Core](img/issue_boards_core_v13_6.png)
![GitLab issue board - Core](img/issue_boards_core_v14_1.png)
Different issue board features are available in different [GitLab tiers](https://about.gitlab.com/pricing/),
as shown in the following table:
......@@ -42,7 +42,7 @@ as shown in the following table:
To learn more, visit [GitLab Enterprise features for issue boards](#gitlab-enterprise-features-for-issue-boards) below.
![GitLab issue board - Premium](img/issue_boards_premium_v13_6.png)
![GitLab issue board - Premium](img/issue_boards_premium_v14_1.png)
<i class="fa fa-youtube-play youtube" aria-hidden="true"></i>
Watch a [video presentation](https://youtu.be/vjccjHI7aGI) of
......@@ -227,21 +227,21 @@ and vice versa.
<!-- This anchor is linked from #blocked-issues as well. -->
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/285074) in GitLab 13.9.
> - [Deployed behind a feature flag](../feature_flags.md), disabled by default.
> - Disabled on GitLab.com.
> - Not recommended for production use.
> - To use it in GitLab self-managed instances, ask a GitLab administrator to [enable it](#enable-or-disable-graphql-based-issue-boards). **(FREE SELF)**
> - [Deployed behind a feature flag](../feature_flags.md), enabled by default.
> - [Enabled by default](https://gitlab.com/gitlab-org/gitlab/-/issues/248908) in GitLab 14.1
> - Recommended for production use.
> - For GitLab self-managed instances, GitLab administrators can opt to [disable it](#enable-or-disable-graphql-based-issue-boards). **(FREE SELF)**
This in-development feature might not be available for your use. There can be
[risks when enabling features still in development](../feature_flags.md#risks-when-enabling-features-still-in-development).
There can be
[risks when disabling released features](../feature_flags.md#risks-when-disabling-released-features).
Refer to this feature's version history for more details.
The work-in-progress GraphQL-based boards come with these features:
Using GraphQL-based boards gives you these
additional features:
- [Edit more issue attributes](#edit-an-issue)
- [View blocked issues](#blocked-issues)
The GraphQL-based Issue Board is a work in progress.
Learn more about the known issues in [epic 5596](https://gitlab.com/groups/gitlab-org/-/epics/5596).
## GitLab Enterprise features for issue boards
......@@ -307,15 +307,16 @@ an assignee list that shows all issues assigned to a user.
You can have a board with both label lists and assignee lists. To add an
assignee list:
1. Select the **Add list** dropdown button.
1. Select the **Assignee list** tab.
1. Search and select the user you want to add as an assignee.
1. Select **Create list**.
1. Select **Assignee**.
1. In the dropdown, select a user.
1. Select **Add to board**.
Now that the assignee list is added, you can assign or unassign issues to that user
by [moving issues](#move-issues-and-lists) to and from an assignee list.
To remove an assignee list, just as with a label list, click the trash icon.
![Assignee lists](img/issue_board_assignee_lists_v13_6.png)
![Assignee lists](img/issue_board_assignee_lists_v14_1.png)
### Milestone lists **(PREMIUM)**
......@@ -324,15 +325,16 @@ To remove an assignee list, just as with a label list, click the trash icon.
You're also able to create lists of a milestone. These are lists that filter issues by the assigned
milestone, giving you more freedom and visibility on the issue board. To add a milestone list:
1. Select the **Add list** dropdown button.
1. Select the **Milestone** tab.
1. Search and click the milestone.
1. Select **Create list**.
1. Select **Milestone**.
1. In the dropdown, select a milestone.
1. Select **Add to board**.
Like the assignee lists, you're able to [drag issues](#move-issues-and-lists)
to and from a milestone list to manipulate the milestone of the dragged issues.
As in other list types, click the trash icon to remove a list.
![Milestone lists](img/issue_board_milestone_lists_v13_6.png)
![Milestone lists](img/issue_board_milestone_lists_v14_1.png)
### Iteration lists **(PREMIUM)**
......@@ -351,7 +353,7 @@ These are lists that filter issues by the assigned
iteration. To add an iteration list:
1. Select **Create list**.
1. Select the **Iteration**.
1. Select **Iteration**.
1. In the dropdown, select an iteration.
1. Select **Add to board**.
......@@ -378,7 +380,7 @@ To group issues by epic in an issue board:
1. Select the **Group by** dropdown button.
1. Select **Epic**.
![Epics Swimlanes](img/epics_swimlanes_v13.6.png)
![Epics Swimlanes](img/epics_swimlanes_v14_1.png)
To edit an issue without leaving this view, select the issue card (not its title), and a sidebar
appears on the right. There you can see and edit the issue's:
......@@ -481,17 +483,12 @@ When you use [GraphQL-based boards](#graphql-based-issue-boards), you can also e
### Create a new list
Create a new list by clicking the **Add list** dropdown button in the upper right corner of the issue board.
Create a new list by clicking the **Create** button in the upper right corner of the issue board.
![creating a new list in an issue board](img/issue_board_add_list_v13_6.png)
![creating a new list in an issue board](img/issue_board_add_list_v14_1.png)
Then, choose the label or user to base the new list on. The new list is inserted
at the end of the lists, before **Done**. To move and reorder lists, drag them around.
To create a list for a label that doesn't yet exist, create the label by
choosing **Create project label** or **Create group label**.
This creates the label immediately and adds it to the dropdown.
You can now choose it to create a list.
Then, choose the label, user or milestone to base the new list on. The new list is inserted
at the end of the lists, before **Closed**. To move and reorder lists, drag them around.
### Remove a list
......@@ -682,10 +679,9 @@ NOTE:
When enabling GraphQL-based issue boards, you must also enable the
[new add list form](#enable-or-disable-new-add-list-form).
GraphQL-based issue boards is not ready for production use.
It is deployed behind a feature flag that is **disabled by default** as of GitLab 13.12.
It is deployed behind a feature flag that is **enabled by default** as of GitLab 14.1.
[GitLab administrators with access to the GitLab Rails console](../../administration/feature_flags.md)
can enable it.
can disable it.
To enable it:
......
......@@ -3,10 +3,11 @@
require 'spec_helper'
RSpec.describe 'Multiple Issue Boards', :js do
let_it_be(:user) { create(:user) }
let_it_be(:group) { create(:group, :public) }
let_it_be(:planning) { create(:group_label, group: group, name: 'Planning') }
let_it_be(:board) { create(:board, group: group) }
let!(:user) { create(:user) }
let!(:group) { create(:group, :public) }
let!(:planning) { create(:group_label, group: group, name: 'Planning') }
let!(:board) { create(:board, group: group, name: 'Board1') }
let!(:board2) { create(:board, group: group, name: 'Board2') }
let(:parent) { group }
let(:boards_path) { group_boards_path(group) }
......@@ -53,12 +54,18 @@ RSpec.describe 'Multiple Issue Boards', :js do
end
end
context 'with multiple group issue boards enabled', quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/334552' do
let!(:board2) { create(:board, group: group) }
context 'with multiple group issue boards enabled' do
before do
stub_licensed_features(multiple_group_issue_boards: true)
end
it_behaves_like 'multiple issue boards'
end
context 'when graphql_board_lists FF disabled' do
before do
stub_feature_flags(graphql_board_lists: false)
stub_licensed_features(multiple_group_issue_boards: true)
end
it_behaves_like 'multiple issue boards'
......
# frozen_string_literal: true
# To be removed as :graphql_board_lists gets removed
# https://gitlab.com/gitlab-org/gitlab/-/issues/248908
require 'spec_helper'
RSpec.describe 'label issues', :js do
......
# frozen_string_literal: true
# To be removed as :graphql_board_lists defaults on
# To be removed as :graphql_board_lists gets removed
# https://gitlab.com/gitlab-org/gitlab/-/issues/248908
require 'spec_helper'
......
......@@ -70,7 +70,7 @@ exports[`ee/BoardContentSidebar matches the snapshot 1`] = `
/>
<boardsidebarlabelsselect-stub
class="labels"
class="block labels"
/>
<sidebarweightwidget-stub
......
......@@ -19,8 +19,6 @@ RSpec.describe 'Group Issue Boards', :js do
let(:card) { find('.board:nth-child(1)').first('.board-card') }
before do
# stubbing until sidebar work is done: https://gitlab.com/gitlab-org/gitlab/-/issues/230711
stub_feature_flags(graphql_board_lists: false)
sign_in(user)
visit group_board_path(group, board)
......@@ -28,6 +26,32 @@ RSpec.describe 'Group Issue Boards', :js do
end
context 'labels' do
it 'only shows valid labels for the issue project and group' do
click_card(card)
page.within('.labels') do
click_button 'Edit'
wait_for_requests
page.within('[data-testid="dropdown-content"]') do
expect(page).to have_content(project_1_label.title)
expect(page).to have_content(group_label.title)
expect(page).not_to have_content(project_2_label.title)
end
end
end
end
context 'when graphql_board_lists FF disabled' do
before do
stub_feature_flags(graphql_board_lists: false)
sign_in(user)
visit group_board_path(group, board)
wait_for_requests
end
it 'only shows valid labels for the issue project and group' do
click_card(card)
......
......@@ -17,7 +17,6 @@ RSpec.describe 'Labels Hierarchy', :js do
let!(:project_label_1) { create(:label, project: project_1, title: 'Label_4') }
before do
stub_feature_flags(graphql_board_lists: false)
stub_feature_flags(board_new_list: false)
grandparent.add_owner(user)
......@@ -25,20 +24,21 @@ RSpec.describe 'Labels Hierarchy', :js do
end
shared_examples 'assigning labels from sidebar' do
it 'can assign all ancestors labels', quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/27952' do
it 'can assign all ancestors labels' do
[grandparent_group_label, parent_group_label, project_label_1].each do |label|
page.within('.block.labels') do
find('.edit-link').click
click_on 'Edit'
end
wait_for_requests
find('a.label-item', text: label.title).click
find('.dropdown-menu-close-icon').click
wait_for_requests
click_on 'Close'
wait_for_requests
expect(page).to have_selector('.badge', text: label.title)
expect(page).to have_selector('.gl-label', text: label.title)
end
end
......@@ -215,6 +215,44 @@ RSpec.describe 'Labels Hierarchy', :js do
end
end
context 'issuable sidebar when graphql_board_lists FF disabled' do
let!(:issue) { create(:issue, project: project_1) }
before do
stub_feature_flags(graphql_board_lists: false)
end
context 'on project board issue sidebar' do
before do
project_1.add_developer(user)
board = create(:board, project: project_1)
visit project_board_path(project_1, board)
wait_for_requests
find('.board-card').click
end
it_behaves_like 'assigning labels from sidebar'
end
context 'on group board issue sidebar' do
before do
parent.add_developer(user)
board = create(:board, group: parent)
visit group_board_path(parent, board)
wait_for_requests
find('.board-card').click
end
it_behaves_like 'assigning labels from sidebar'
end
end
context 'issuable filtering' do
let!(:labeled_issue) { create(:labeled_issue, project: project_1, labels: [grandparent_group_label, parent_group_label, project_label_1]) }
let!(:issue) { create(:issue, project: project_1) }
......@@ -301,6 +339,34 @@ RSpec.describe 'Labels Hierarchy', :js do
context 'on group boards' do
let(:board) { create(:board, group: parent) }
before do
parent.add_developer(user)
visit group_board_path(parent, board)
find('.js-new-board-list').click
wait_for_requests
end
context 'when graphql_board_lists FF enabled' do
it 'creates lists from all ancestor group labels' do
[grandparent_group_label, parent_group_label].each do |label|
find('a', text: label.title).click
end
wait_for_requests
expect(page).to have_selector('.board-title-text', text: grandparent_group_label.title)
expect(page).to have_selector('.board-title-text', text: parent_group_label.title)
end
it 'does not create lists from descendant groups' do
expect(page).not_to have_selector('a', text: child_group_label.title)
end
end
end
context 'when graphql_board_lists FF disabled' do
let(:board) { create(:board, group: parent) }
before do
stub_feature_flags(graphql_board_lists: false)
parent.add_developer(user)
......
......@@ -109,6 +109,18 @@ RSpec.shared_examples 'multiple issue boards' do
assert_boards_nav_active
end
it 'switches current board back' do
in_boards_switcher_dropdown do
click_link board.name
end
wait_for_requests
page.within('.boards-switcher') do
expect(page).to have_content(board.name)
end
end
end
context 'unauthorized user' do
......
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