Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
0313282761
commit
3d78839162
|
|
@ -20,7 +20,6 @@ import Subscriptions from '~/sidebar/components/subscriptions/subscriptions.vue'
|
||||||
import TimeTracker from '~/sidebar/components/time_tracking/time_tracker.vue';
|
import TimeTracker from '~/sidebar/components/time_tracking/time_tracker.vue';
|
||||||
import eventHub from '~/sidebar/event_hub';
|
import eventHub from '~/sidebar/event_hub';
|
||||||
import boardsStore from '../stores/boards_store';
|
import boardsStore from '../stores/boards_store';
|
||||||
import RemoveBtn from './sidebar/remove_issue.vue';
|
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
components: {
|
components: {
|
||||||
|
|
@ -29,7 +28,6 @@ export default Vue.extend({
|
||||||
GlLabel,
|
GlLabel,
|
||||||
SidebarEpicsSelect: () =>
|
SidebarEpicsSelect: () =>
|
||||||
import('ee_component/sidebar/components/sidebar_item_epics_select.vue'),
|
import('ee_component/sidebar/components/sidebar_item_epics_select.vue'),
|
||||||
RemoveBtn,
|
|
||||||
Subscriptions,
|
Subscriptions,
|
||||||
TimeTracker,
|
TimeTracker,
|
||||||
SidebarAssigneesWidget,
|
SidebarAssigneesWidget,
|
||||||
|
|
|
||||||
|
|
@ -1,88 +0,0 @@
|
||||||
<script>
|
|
||||||
import { GlButton } from '@gitlab/ui';
|
|
||||||
import axios from '~/lib/utils/axios_utils';
|
|
||||||
import { deprecatedCreateFlash as Flash } from '../../../flash';
|
|
||||||
import { __ } from '../../../locale';
|
|
||||||
import boardsStore from '../../stores/boards_store';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
components: {
|
|
||||||
GlButton,
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
issue: {
|
|
||||||
type: Object,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
list: {
|
|
||||||
type: Object,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
updateUrl() {
|
|
||||||
return this.issue.path;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
removeIssue() {
|
|
||||||
const { issue } = this;
|
|
||||||
const lists = issue.getLists();
|
|
||||||
const req = this.buildPatchRequest(issue, lists);
|
|
||||||
|
|
||||||
const data = {
|
|
||||||
issue: this.seedPatchRequest(issue, req),
|
|
||||||
};
|
|
||||||
|
|
||||||
if (data.issue.label_ids.length === 0) {
|
|
||||||
data.issue.label_ids = [''];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Post the remove data
|
|
||||||
axios.patch(this.updateUrl, data).catch(() => {
|
|
||||||
Flash(__('Failed to remove issue from board, please try again.'));
|
|
||||||
|
|
||||||
lists.forEach((list) => {
|
|
||||||
list.addIssue(issue);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
// Remove from the frontend store
|
|
||||||
lists.forEach((list) => {
|
|
||||||
list.removeIssue(issue);
|
|
||||||
});
|
|
||||||
|
|
||||||
boardsStore.clearDetailIssue();
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Build the default patch request.
|
|
||||||
*/
|
|
||||||
buildPatchRequest(issue, lists) {
|
|
||||||
const listLabelIds = lists.map((list) => list.label.id);
|
|
||||||
|
|
||||||
const labelIds = issue.labels
|
|
||||||
.map((label) => label.id)
|
|
||||||
.filter((id) => !listLabelIds.includes(id));
|
|
||||||
|
|
||||||
return {
|
|
||||||
label_ids: labelIds,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Seed the given patch request.
|
|
||||||
*
|
|
||||||
* (This is overridden in EE)
|
|
||||||
*/
|
|
||||||
seedPatchRequest(issue, req) {
|
|
||||||
return req;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<template>
|
|
||||||
<div class="block list">
|
|
||||||
<gl-button variant="default" category="secondary" block="block" @click="removeIssue">
|
|
||||||
{{ __('Remove from board') }}
|
|
||||||
</gl-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
@ -25,7 +25,3 @@
|
||||||
= render "shared/boards/components/sidebar/labels"
|
= render "shared/boards/components/sidebar/labels"
|
||||||
= render_if_exists "shared/boards/components/sidebar/weight"
|
= render_if_exists "shared/boards/components/sidebar/weight"
|
||||||
= render "shared/boards/components/sidebar/notifications"
|
= render "shared/boards/components/sidebar/notifications"
|
||||||
%remove-btn{ ":issue" => "issue",
|
|
||||||
":issue-update" => "issue.sidebarInfoEndpoint",
|
|
||||||
":list" => "list",
|
|
||||||
"v-if" => "canRemove" }
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: Remove Remove from board button from board sidebar
|
||||||
|
merge_request: 53946
|
||||||
|
author:
|
||||||
|
type: removed
|
||||||
|
|
@ -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
|
POST /projects/:id/merge_requests/:merge_request_iid/discussions
|
||||||
```
|
```
|
||||||
|
|
||||||
Parameters:
|
Parameters for all comments:
|
||||||
|
|
||||||
| Attribute | Type | Required | Description |
|
| Attribute | Type | Required | Description |
|
||||||
| ---------------------------------------- | -------------- | -------- | ----------- |
|
| ---------------------------------------- | -------------- | -------- | ----------- |
|
||||||
|
|
@ -858,21 +858,28 @@ Parameters:
|
||||||
| `position[old_path]` | string | no | File path before change |
|
| `position[old_path]` | string | no | File path before change |
|
||||||
| `position[old_line]` | integer | no | Line number before change (for 'text' diff notes) |
|
| `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]` | 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[width]` | integer | no | Width of the image (for 'image' diff notes) |
|
||||||
| `position[height]` | integer | no | Height 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[x]` | integer | no | X coordinate (for 'image' diff notes) |
|
||||||
| `position[y]` | integer | no | Y 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
|
```shell
|
||||||
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/11/discussions?body=comment"
|
curl --request POST --header "PRIVATE-TOKEN: <your_access_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 a merge request thread
|
||||||
|
|
||||||
Resolve/unresolve whole thread of a merge request.
|
Resolve/unresolve whole thread of a merge request.
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 27 KiB |
|
|
@ -87,9 +87,9 @@ To delete the currently active issue board:
|
||||||
You can tailor GitLab issue boards to your own preferred workflow.
|
You can tailor GitLab issue boards to your own preferred workflow.
|
||||||
Here are some common use cases for issue boards.
|
Here are some common use cases for issue boards.
|
||||||
|
|
||||||
For examples of using issue boards along with [epics](../group/epics/index.md) **(PREMIUM)**,
|
For examples of using issue boards along with [epics](../group/epics/index.md),
|
||||||
[issue health status](issues/index.md#health-status) **(ULTIMATE)**, and
|
[issue health status](issues/index.md#health-status), and
|
||||||
[scoped labels](labels.md#scoped-labels) **(PREMIUM)** for various Agile frameworks, check:
|
[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)
|
- 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)
|
||||||
- <i class="fa fa-youtube-play youtube" aria-hidden="true"></i>
|
- <i class="fa fa-youtube-play youtube" aria-hidden="true"></i>
|
||||||
|
|
@ -485,11 +485,14 @@ the list by filtering by the following:
|
||||||
|
|
||||||
### Remove an issue from a list
|
### Remove an issue from a list
|
||||||
|
|
||||||
Removing an issue from a list can be done by clicking the issue card and then
|
> The **Remove from board** button was [removed](https://gitlab.com/gitlab-org/gitlab/-/issues/229507) in GitLab 13.10.
|
||||||
clicking the **Remove from board** button in the sidebar. The
|
|
||||||
respective label is removed.
|
|
||||||
|
|
||||||

|
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
|
### Filter issues
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12608,9 +12608,6 @@ msgstr ""
|
||||||
msgid "Failed to remove a to-do item for the design."
|
msgid "Failed to remove a to-do item for the design."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Failed to remove issue from board, please try again."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid "Failed to remove mirror."
|
msgid "Failed to remove mirror."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
@ -25038,9 +25035,6 @@ msgstr ""
|
||||||
msgid "Remove from batch"
|
msgid "Remove from batch"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Remove from board"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid "Remove from epic"
|
msgid "Remove from epic"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -72,36 +72,6 @@ RSpec.describe 'Issue Boards', :js do
|
||||||
end
|
end
|
||||||
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
|
context 'assignee' do
|
||||||
it 'updates the issues assignee' do
|
it 'updates the issues assignee' do
|
||||||
click_card(card)
|
click_card(card)
|
||||||
|
|
|
||||||
|
|
@ -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);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
Loading…
Reference in New Issue