diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 16:18:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 16:18:24 +0300 |
commit | 0653e08efd039a5905f3fa4f6e9cef9f5d2f799c (patch) | |
tree | 4dcc884cf6d81db44adae4aa99f8ec1233a41f55 /app/assets/javascripts/boards/components/board_form.vue | |
parent | 744144d28e3e7fddc117924fef88de5d9674fe4c (diff) |
Add latest changes from gitlab-org/gitlab@14-3-stable-eev14.3.0-rc42
Diffstat (limited to 'app/assets/javascripts/boards/components/board_form.vue')
-rw-r--r-- | app/assets/javascripts/boards/components/board_form.vue | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/app/assets/javascripts/boards/components/board_form.vue b/app/assets/javascripts/boards/components/board_form.vue index a89f71504a9..e939f0c0ebe 100644 --- a/app/assets/javascripts/boards/components/board_form.vue +++ b/app/assets/javascripts/boards/components/board_form.vue @@ -1,8 +1,7 @@ <script> import { GlModal, GlAlert } from '@gitlab/ui'; import { mapGetters, mapActions, mapState } from 'vuex'; -import ListLabel from '~/boards/models/label'; -import { TYPE_ITERATION, TYPE_MILESTONE } from '~/graphql_shared/constants'; +import { TYPE_USER, TYPE_ITERATION, TYPE_MILESTONE } from '~/graphql_shared/constants'; import { convertToGraphQLId } from '~/graphql_shared/utils'; import { getParameterByName, visitUrl } from '~/lib/utils/url_utility'; import { __, s__ } from '~/locale'; @@ -189,7 +188,9 @@ export default { issueBoardScopeMutationVariables() { return { weight: this.board.weight, - assigneeId: this.board.assignee?.id || null, + assigneeId: this.board.assignee?.id + ? convertToGraphQLId(TYPE_USER, this.board.assignee.id) + : null, milestoneId: this.board.milestone?.id ? convertToGraphQLId(TYPE_MILESTONE, this.board.milestone.id) : null, @@ -289,14 +290,10 @@ export default { setBoardLabels(labels) { labels.forEach((label) => { if (label.set && !this.board.labels.find((l) => l.id === label.id)) { - this.board.labels.push( - new ListLabel({ - id: label.id, - title: label.title, - color: label.color, - textColor: label.text_color, - }), - ); + this.board.labels.push({ + ...label, + textColor: label.text_color, + }); } else if (!label.set) { this.board.labels = this.board.labels.filter((selected) => selected.id !== label.id); } |