summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrett Walker <bwalker@gitlab.com>2018-10-31 18:54:33 -0500
committerBrett Walker <bwalker@gitlab.com>2018-10-31 19:01:04 -0500
commit9b1e49afc111451035dafe1f7e2a2d7bcb57f820 (patch)
treeca44c139b91c197cd6486f684ffd2fbcef121442
parenta8869a571b3093004d8777cfe1a3e56a22db0210 (diff)
downloadgitlab-ce-9b1e49afc111451035dafe1f7e2a2d7bcb57f820.tar.gz
Rename to assignable_labels_endpoint51620-cannot-add-label-to-issue-from-board
-rw-r--r--app/assets/javascripts/boards/models/issue.js2
-rw-r--r--app/models/issue.rb2
-rw-r--r--app/views/shared/boards/components/sidebar/_labels.html.haml2
-rw-r--r--spec/fixtures/api/schemas/issue.json2
4 files changed, 4 insertions, 4 deletions
diff --git a/app/assets/javascripts/boards/models/issue.js b/app/assets/javascripts/boards/models/issue.js
index ce03c21c90f..669630edcab 100644
--- a/app/assets/javascripts/boards/models/issue.js
+++ b/app/assets/javascripts/boards/models/issue.js
@@ -30,7 +30,7 @@ class ListIssue {
this.toggleSubscriptionEndpoint = obj.toggle_subscription_endpoint;
this.milestone_id = obj.milestone_id;
this.project_id = obj.project_id;
- this.validLabelsEndpoint = obj.valid_labels_endpoint;
+ this.assignableLabelsEndpoint = obj.assignable_labels_endpoint;
if (obj.project) {
this.project = new IssueProject(obj.project);
diff --git a/app/models/issue.rb b/app/models/issue.rb
index 50ea0c830ee..0de5e434b02 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -241,7 +241,7 @@ class Issue < ActiveRecord::Base
real_path: url_helper.project_issue_path(project, self),
issue_sidebar_endpoint: url_helper.project_issue_path(project, self, format: :json, serializer: 'sidebar'),
toggle_subscription_endpoint: url_helper.toggle_subscription_project_issue_path(project, self),
- valid_labels_endpoint: url_helper.project_labels_path(project, format: :json, include_ancestor_groups: true)
+ assignable_labels_endpoint: url_helper.project_labels_path(project, format: :json, include_ancestor_groups: true)
)
end
diff --git a/app/views/shared/boards/components/sidebar/_labels.html.haml b/app/views/shared/boards/components/sidebar/_labels.html.haml
index 3448ee8350b..19159684420 100644
--- a/app/views/shared/boards/components/sidebar/_labels.html.haml
+++ b/app/views/shared/boards/components/sidebar/_labels.html.haml
@@ -20,7 +20,7 @@
.dropdown
%button.dropdown-menu-toggle.js-label-select.js-multiselect.js-issue-board-sidebar{ type: "button",
":data-selected" => "selectedLabels",
- ":data-labels" => "issue.validLabelsEndpoint",
+ ":data-labels" => "issue.assignableLabelsEndpoint",
data: { toggle: "dropdown",
field_name: "issue[label_names][]",
show_no: "true",
diff --git a/spec/fixtures/api/schemas/issue.json b/spec/fixtures/api/schemas/issue.json
index 28f11115428..4878df43d28 100644
--- a/spec/fixtures/api/schemas/issue.json
+++ b/spec/fixtures/api/schemas/issue.json
@@ -15,7 +15,7 @@
"relative_position": { "type": "integer" },
"issue_sidebar_endpoint": { "type": "string" },
"toggle_subscription_endpoint": { "type": "string" },
- "valid_labels_endpoint": { "type": "string" },
+ "assignable_labels_endpoint": { "type": "string" },
"reference_path": { "type": "string" },
"real_path": { "type": "string" },
"project": {