summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-10-03 14:54:42 +0100
committerPhil Hughes <me@iamphill.com>2016-10-06 11:00:01 +0100
commit674844d0e98e3e9a730f3e67f17d688ec769f0e5 (patch)
tree9fc0bb23b2c983616a282e40255623d42348cda7 /app
parent4d9f76c15115d3fd48d61e998edca86917fb1ccf (diff)
downloadgitlab-ce-674844d0e98e3e9a730f3e67f17d688ec769f0e5.tar.gz
Fixed issue with backlog list not saving
Fixed issue when dragging cards
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/boards/components/board_list.js.es64
-rw-r--r--app/assets/javascripts/boards/components/board_new_issue.js.es63
-rw-r--r--app/controllers/projects/boards/issues_controller.rb2
-rw-r--r--app/views/projects/boards/components/_card.html.haml2
4 files changed, 6 insertions, 5 deletions
diff --git a/app/assets/javascripts/boards/components/board_list.js.es6 b/app/assets/javascripts/boards/components/board_list.js.es6
index 208aac504fd..bc74a7b23c9 100644
--- a/app/assets/javascripts/boards/components/board_list.js.es6
+++ b/app/assets/javascripts/boards/components/board_list.js.es6
@@ -78,7 +78,7 @@
disabled: this.disabled,
filter: '.board-list-count, .board-new-issue-form',
onStart: (e) => {
- const card = this.$refs.issue[e.oldIndex];
+ const card = this.$refs.issue[e.oldIndex - 1];
Store.moving.issue = card.issue;
Store.moving.list = card.list;
@@ -89,7 +89,7 @@
gl.issueBoards.BoardsStore.moveIssueToList(Store.moving.list, this.list, Store.moving.issue);
},
onRemove: (e) => {
- this.$refs.issue[e.oldIndex].$destroy(true);
+ this.$refs.issue[e.oldIndex - 1].$destroy(true);
}
});
diff --git a/app/assets/javascripts/boards/components/board_new_issue.js.es6 b/app/assets/javascripts/boards/components/board_new_issue.js.es6
index 60c13afefeb..eb26ed9721d 100644
--- a/app/assets/javascripts/boards/components/board_new_issue.js.es6
+++ b/app/assets/javascripts/boards/components/board_new_issue.js.es6
@@ -19,9 +19,10 @@
methods: {
submit(e) {
e.preventDefault();
+ const labels = this.list.label ? [this.list.label] : [];
const issue = new ListIssue({
title: this.title,
- labels: [this.list.label]
+ labels
});
this.list.newIssue(issue);
diff --git a/app/controllers/projects/boards/issues_controller.rb b/app/controllers/projects/boards/issues_controller.rb
index 41794193784..3b1b236a89a 100644
--- a/app/controllers/projects/boards/issues_controller.rb
+++ b/app/controllers/projects/boards/issues_controller.rb
@@ -23,7 +23,7 @@ module Projects
list = project.board.lists.find(params[:list_id])
issue = Issues::CreateService.new(project, current_user, issue_params.merge(request: request)).execute
- issue.labels << list.label
+ issue.labels << list.label if list.label
render json: issue.to_json
end
diff --git a/app/views/projects/boards/components/_card.html.haml b/app/views/projects/boards/components/_card.html.haml
index e8b60b54d80..25701b0a99e 100644
--- a/app/views/projects/boards/components/_card.html.haml
+++ b/app/views/projects/boards/components/_card.html.haml
@@ -15,7 +15,7 @@
":title" => "issue.title" }
{{ issue.title }}
.card-footer
- %span.card-number
+ %span.card-number{ "v-if" => "issue.id" }
= precede '#' do
{{ issue.id }}
%button.label.color-label.has-tooltip{ "v-for" => "label in issue.labels",