Commit 939f1a4f authored by Natalia Tepluhina's avatar Natalia Tepluhina Committed by Nicolò Maria Mezzopera

Remove `Add Issues` button and a related modal

parent 3c8a630c
...@@ -306,7 +306,7 @@ export default () => { ...@@ -306,7 +306,7 @@ export default () => {
const issueBoardsModal = document.getElementById('js-add-issues-btn'); const issueBoardsModal = document.getElementById('js-add-issues-btn');
if (issueBoardsModal) { if (issueBoardsModal && gon.features.addIssuesButton) {
// eslint-disable-next-line no-new // eslint-disable-next-line no-new
new Vue({ new Vue({
el: issueBoardsModal, el: issueBoardsModal,
......
...@@ -7,6 +7,9 @@ class Projects::BoardsController < Projects::ApplicationController ...@@ -7,6 +7,9 @@ class Projects::BoardsController < Projects::ApplicationController
before_action :check_issues_available! before_action :check_issues_available!
before_action :authorize_read_board!, only: [:index, :show] before_action :authorize_read_board!, only: [:index, :show]
before_action :assign_endpoint_vars before_action :assign_endpoint_vars
before_action do
push_frontend_feature_flag(:add_issues_button)
end
feature_category :boards feature_category :boards
......
---
title: Remove `Add Issues` button and a related modal
merge_request: 47898
author:
type: changed
---
name: add_issues_button
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/47898
rollout_issue_url:
milestone: '13.6'
type: development
group: group::project management
default_enabled: false
...@@ -433,7 +433,13 @@ To remove a list from an issue board: ...@@ -433,7 +433,13 @@ To remove a list from an issue board:
1. Select **Remove list**. A confirmation dialog appears. 1. Select **Remove list**. A confirmation dialog appears.
1. Select **OK**. 1. Select **OK**.
### Add issues to a list ### Add issues to a list **(CORE ONLY)**
> - Feature flag [introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/47898) in GitLab 13.7.
> - It's [deployed behind a feature flag](../feature_flags.md), disabled by default.
> - It's disabled on GitLab.com.
> - It's recommended for production use.
> - To use it in GitLab self-managed instances, ask a GitLab administrator to [enable it](#enable-or-disable-adding-issues-to-the-list). **(CORE ONLY)**
You can add issues to a list in a project issue board by clicking the **Add issues** button You can add issues to a list in a project issue board by clicking the **Add issues** button
in the top right corner of the issue board. This opens up a modal in the top right corner of the issue board. This opens up a modal
...@@ -453,7 +459,23 @@ the list by filtering by the following: ...@@ -453,7 +459,23 @@ the list by filtering by the following:
- Release - Release
- Weight - Weight
![Bulk adding issues to lists](img/issue_boards_add_issues_modal_v13_6.png) #### Enable or disable adding issues to the list **(CORE ONLY)**
Adding issues to the list is deployed behind a feature flag that is **disabled by default**.
[GitLab administrators with access to the GitLab Rails console](../../administration/feature_flags.md)
can enable it.
To enable it:
```ruby
Feature.enable(:add_issues_button)
```
To disable it:
```ruby
Feature.disable(:add_issues_button)
```
### Remove an issue from a list ### Remove an issue from a list
......
...@@ -12,6 +12,7 @@ RSpec.describe 'Issue Boards add issue modal', :js do ...@@ -12,6 +12,7 @@ RSpec.describe 'Issue Boards add issue modal', :js do
let!(:issue) { create(:issue, project: project, title: 'abc', description: 'def') } let!(:issue) { create(:issue, project: project, title: 'abc', description: 'def') }
before do before do
stub_feature_flags(add_issues_button: true)
project.add_maintainer(user) project.add_maintainer(user)
sign_in(user) sign_in(user)
......
...@@ -37,6 +37,10 @@ RSpec.describe 'Issue Boards add issue modal', :js do ...@@ -37,6 +37,10 @@ RSpec.describe 'Issue Boards add issue modal', :js do
end end
context 'modal interaction' do context 'modal interaction' do
before do
stub_feature_flags(add_issues_button: true)
end
it 'opens modal' do it 'opens modal' do
click_button('Add issues') click_button('Add issues')
...@@ -72,6 +76,7 @@ RSpec.describe 'Issue Boards add issue modal', :js do ...@@ -72,6 +76,7 @@ RSpec.describe 'Issue Boards add issue modal', :js do
context 'issues list' do context 'issues list' do
before do before do
stub_feature_flags(add_issues_button: true)
click_button('Add issues') click_button('Add issues')
wait_for_requests wait_for_requests
......
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