diff --git a/app/assets/javascripts/boards/components/board_sidebar.js b/app/assets/javascripts/boards/components/board_sidebar.js index 9198a9019f8..55bc91cbcff 100644 --- a/app/assets/javascripts/boards/components/board_sidebar.js +++ b/app/assets/javascripts/boards/components/board_sidebar.js @@ -20,7 +20,6 @@ import Subscriptions from '~/sidebar/components/subscriptions/subscriptions.vue' import TimeTracker from '~/sidebar/components/time_tracking/time_tracker.vue'; import eventHub from '~/sidebar/event_hub'; import boardsStore from '../stores/boards_store'; -import RemoveBtn from './sidebar/remove_issue.vue'; export default Vue.extend({ components: { @@ -29,7 +28,6 @@ export default Vue.extend({ GlLabel, SidebarEpicsSelect: () => import('ee_component/sidebar/components/sidebar_item_epics_select.vue'), - RemoveBtn, Subscriptions, TimeTracker, SidebarAssigneesWidget, diff --git a/app/assets/javascripts/boards/components/sidebar/remove_issue.vue b/app/assets/javascripts/boards/components/sidebar/remove_issue.vue deleted file mode 100644 index 8d65f3240c8..00000000000 --- a/app/assets/javascripts/boards/components/sidebar/remove_issue.vue +++ /dev/null @@ -1,88 +0,0 @@ - - diff --git a/app/views/shared/boards/components/_sidebar.html.haml b/app/views/shared/boards/components/_sidebar.html.haml index 3daa13fb488..59dd571604b 100644 --- a/app/views/shared/boards/components/_sidebar.html.haml +++ b/app/views/shared/boards/components/_sidebar.html.haml @@ -25,7 +25,3 @@ = render "shared/boards/components/sidebar/labels" = render_if_exists "shared/boards/components/sidebar/weight" = render "shared/boards/components/sidebar/notifications" - %remove-btn{ ":issue" => "issue", - ":issue-update" => "issue.sidebarInfoEndpoint", - ":list" => "list", - "v-if" => "canRemove" } diff --git a/changelogs/unreleased/229507-graphql-mutation-to-remove-issue-from-board.yml b/changelogs/unreleased/229507-graphql-mutation-to-remove-issue-from-board.yml new file mode 100644 index 00000000000..e8b4573d8f8 --- /dev/null +++ b/changelogs/unreleased/229507-graphql-mutation-to-remove-issue-from-board.yml @@ -0,0 +1,5 @@ +--- +title: Remove Remove from board button from board sidebar +merge_request: 53946 +author: +type: removed diff --git a/doc/api/discussions.md b/doc/api/discussions.md index d88d4780e65..8b72f916759 100644 --- a/doc/api/discussions.md +++ b/doc/api/discussions.md @@ -839,7 +839,7 @@ a note but other comments (replies) can be added to it later. POST /projects/:id/merge_requests/:merge_request_iid/discussions ``` -Parameters: +Parameters for all comments: | Attribute | Type | Required | Description | | ---------------------------------------- | -------------- | -------- | ----------- | @@ -858,21 +858,28 @@ Parameters: | `position[old_path]` | string | no | File path before change | | `position[old_line]` | integer | no | Line number before change (for 'text' diff notes) | | `position[line_range]` | hash | no | Line range for a multi-line diff note | -| `position[line_range][start]` | hash | no | Multiline note starting line | -| `position[line_range][start][line_code]` | string | yes | Line code for the start line | -| `position[line_range][start][type]` | string | yes | Line type for the start line | -| `position[line_range][end]` | hash | no | Multiline note ending line | -| `position[line_range][end][line_code]` | string | yes | Line code for the end line | -| `position[line_range][end][type]` | string | yes | Line type for the end line | | `position[width]` | integer | no | Width of the image (for 'image' diff notes) | | `position[height]` | integer | no | Height of the image (for 'image' diff notes) | | `position[x]` | integer | no | X coordinate (for 'image' diff notes) | | `position[y]` | integer | no | Y coordinate (for 'image' diff notes) | +Parameters for multiline comments only: + +| Attribute | Type | Required | Description | +| ---------------------------------------- | -------------- | -------- | ----------- | +| `position[line_range][start]` | hash | no | Multiline note starting line | +| `position[line_range][start][line_code]` | string | no | Line code for the start line | +| `position[line_range][start][type]` | string | no | Line type for the start line | +| `position[line_range][end]` | hash | no | Multiline note ending line | +| `position[line_range][end][line_code]` | string | no | Line code for the end line | +| `position[line_range][end][type]` | string | no | Line type for the end line | + ```shell curl --request POST --header "PRIVATE-TOKEN: " "https://gitlab.example.com/api/v4/projects/5/merge_requests/11/discussions?body=comment" ``` +There is currently no functional documented method of starting merge request discussions. Read [this issue](https://gitlab.com/gitlab-org/gitlab/-/issues/228807) for reflections. + ### Resolve a merge request thread Resolve/unresolve whole thread of a merge request. diff --git a/doc/user/project/img/issue_boards_remove_issue_v13_6.png b/doc/user/project/img/issue_boards_remove_issue_v13_6.png deleted file mode 100644 index c980759ad0c..00000000000 Binary files a/doc/user/project/img/issue_boards_remove_issue_v13_6.png and /dev/null differ diff --git a/doc/user/project/issue_board.md b/doc/user/project/issue_board.md index 9c12591fa61..a537972dff7 100644 --- a/doc/user/project/issue_board.md +++ b/doc/user/project/issue_board.md @@ -87,9 +87,9 @@ To delete the currently active issue board: You can tailor GitLab issue boards to your own preferred workflow. Here are some common use cases for issue boards. -For examples of using issue boards along with [epics](../group/epics/index.md) **(PREMIUM)**, -[issue health status](issues/index.md#health-status) **(ULTIMATE)**, and -[scoped labels](labels.md#scoped-labels) **(PREMIUM)** for various Agile frameworks, check: +For examples of using issue boards along with [epics](../group/epics/index.md), +[issue health status](issues/index.md#health-status), and +[scoped labels](labels.md#scoped-labels) for various Agile frameworks, check: - The [How to use GitLab for Agile portfolio planning and project management](https://about.gitlab.com/blog/2020/11/11/gitlab-for-agile-portfolio-planning-project-management/) blog post (November 2020) - @@ -485,11 +485,14 @@ the list by filtering by the following: ### Remove an issue from a list -Removing an issue from a list can be done by clicking the issue card and then -clicking the **Remove from board** button in the sidebar. The -respective label is removed. +> The **Remove from board** button was [removed](https://gitlab.com/gitlab-org/gitlab/-/issues/229507) in GitLab 13.10. -![Remove issue from list](img/issue_boards_remove_issue_v13_6.png) +When an issue should no longer belong to a list, you can remove it. +The steps depend on the scope of the list: + +1. To open the right sidebar, select the issue card. +1. Remove what's keeping the issue in the list. + If it's a label list, remove the label. If it's an [assignee list](#assignee-lists), unassign the user. ### Filter issues diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 3e8c21d436b..d503936eebf 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -12608,9 +12608,6 @@ msgstr "" msgid "Failed to remove a to-do item for the design." msgstr "" -msgid "Failed to remove issue from board, please try again." -msgstr "" - msgid "Failed to remove mirror." msgstr "" @@ -25038,9 +25035,6 @@ msgstr "" msgid "Remove from batch" msgstr "" -msgid "Remove from board" -msgstr "" - msgid "Remove from epic" msgstr "" diff --git a/spec/features/boards/sidebar_spec.rb b/spec/features/boards/sidebar_spec.rb index 08bc70d7116..c79bf2abff1 100644 --- a/spec/features/boards/sidebar_spec.rb +++ b/spec/features/boards/sidebar_spec.rb @@ -72,36 +72,6 @@ RSpec.describe 'Issue Boards', :js do end end - it 'removes card from board when clicking' do - click_card(card) - - page.within('.issue-boards-sidebar') do - click_button 'Remove from board' - end - - wait_for_requests - - page.within(find('.board:nth-child(2)')) do - expect(page).to have_selector('.board-card', count: 1) - end - end - - it 'does not show remove button for backlog or closed issues' do - create(:issue, project: project) - create(:issue, :closed, project: project) - - visit project_board_path(project, board) - wait_for_requests - - click_card(find('.board:nth-child(1)').first('.board-card')) - - expect(find('.issue-boards-sidebar')).not_to have_button 'Remove from board' - - click_card(find('.board:nth-child(3)').first('.board-card')) - - expect(find('.issue-boards-sidebar')).not_to have_button 'Remove from board' - end - context 'assignee' do it 'updates the issues assignee' do click_card(card) diff --git a/spec/frontend/boards/components/sidebar/remove_issue_spec.js b/spec/frontend/boards/components/sidebar/remove_issue_spec.js deleted file mode 100644 index 1f740c10106..00000000000 --- a/spec/frontend/boards/components/sidebar/remove_issue_spec.js +++ /dev/null @@ -1,28 +0,0 @@ -import { GlButton } from '@gitlab/ui'; -import { shallowMount } from '@vue/test-utils'; - -import RemoveIssue from '~/boards/components/sidebar/remove_issue.vue'; - -describe('boards sidebar remove issue', () => { - let wrapper; - - const findButton = () => wrapper.find(GlButton); - - const createComponent = (propsData) => { - wrapper = shallowMount(RemoveIssue, { - propsData: { - issue: {}, - list: {}, - ...propsData, - }, - }); - }; - - beforeEach(() => { - createComponent(); - }); - - it('renders remove button', () => { - expect(findButton().exists()).toBe(true); - }); -});