summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKushal Pandya <kushalspandya@gmail.com>2019-01-07 12:24:55 +0000
committerKushal Pandya <kushalspandya@gmail.com>2019-01-07 12:24:55 +0000
commitada8ccdb579bb791a67f6d2dd865a91137e702c8 (patch)
treebd325876efb1b8765493b9dabcd343885ccd3ee2
parentbb482389308065bc0c07a8023c153f01d3c34990 (diff)
parentcf5a9d2993c2998e6394560f5c4fe2fef3f35b1c (diff)
downloadgitlab-ce-ada8ccdb579bb791a67f6d2dd865a91137e702c8.tar.gz
Merge branch '54311-fix-board-add-label' into 'master'
Fix error when creating labels in a new issue in the boards page Closes #54311 See merge request gitlab-org/gitlab-ce!24039
-rw-r--r--app/assets/javascripts/boards/models/list.js1
-rw-r--r--changelogs/unreleased/54311-fix-board-add-label.yml5
-rw-r--r--spec/features/boards/new_issue_spec.rb21
3 files changed, 27 insertions, 0 deletions
diff --git a/app/assets/javascripts/boards/models/list.js b/app/assets/javascripts/boards/models/list.js
index dd3feedbc0e..9f6d9a853da 100644
--- a/app/assets/javascripts/boards/models/list.js
+++ b/app/assets/javascripts/boards/models/list.js
@@ -244,6 +244,7 @@ class List {
issue.project = data.project;
issue.path = data.real_path;
issue.referencePath = data.reference_path;
+ issue.assignableLabelsEndpoint = data.assignable_labels_endpoint;
if (this.issuesSize > 1) {
const moveBeforeId = this.issues[1].id;
diff --git a/changelogs/unreleased/54311-fix-board-add-label.yml b/changelogs/unreleased/54311-fix-board-add-label.yml
new file mode 100644
index 00000000000..8fd8f7a0381
--- /dev/null
+++ b/changelogs/unreleased/54311-fix-board-add-label.yml
@@ -0,0 +1,5 @@
+---
+title: Fix error when creating labels in a new issue in the boards page
+merge_request: 24039
+author: Ruben Moya
+type: fixed
diff --git a/spec/features/boards/new_issue_spec.rb b/spec/features/boards/new_issue_spec.rb
index 164442a47f5..d0c4534e317 100644
--- a/spec/features/boards/new_issue_spec.rb
+++ b/spec/features/boards/new_issue_spec.rb
@@ -86,6 +86,27 @@ describe 'Issue Boards new issue', :js do
expect(page).to have_selector('.issue-boards-sidebar')
end
+
+ it 'successfuly loads labels to be added to newly created issue' do
+ page.within(first('.board')) do
+ find('.issue-count-badge-add-button').click
+ end
+
+ page.within(first('.board-new-issue-form')) do
+ find('.form-control').set('new issue')
+ click_button 'Submit issue'
+ end
+
+ wait_for_requests
+
+ page.within(first('.issue-boards-sidebar')) do
+ find('.labels .edit-link').click
+
+ wait_for_requests
+
+ expect(page).to have_selector('.labels .dropdown-content li a')
+ end
+ end
end
context 'unauthorized user' do