Skip to content
Snippets Groups Projects
Commit e4571614 authored by Phil Hughes's avatar Phil Hughes
Browse files

Make the subscribe button work correctly

parent 7d20a91b
No related branches found
No related tags found
1 merge request!6690Issue board sidebar
Pipeline #
(() => { (() => {
const Store = gl.issueBoards.BoardsStore;
window.gl = window.gl || {}; window.gl = window.gl || {};
   
gl.issueBoards.BoardNewIssue = Vue.extend({ gl.issueBoards.BoardNewIssue = Vue.extend({
Loading
@@ -27,13 +29,16 @@
Loading
@@ -27,13 +29,16 @@
const labels = this.list.label ? [this.list.label] : []; const labels = this.list.label ? [this.list.label] : [];
const issue = new ListIssue({ const issue = new ListIssue({
title: this.title, title: this.title,
labels labels,
subscribed: true
}); });
   
this.list.newIssue(issue) this.list.newIssue(issue)
.then((data) => { .then((data) => {
// Need this because our jQuery very kindly disables buttons on ALL form submissions // Need this because our jQuery very kindly disables buttons on ALL form submissions
$(this.$els.submitButton).enable(); $(this.$els.submitButton).enable();
Store.detail.issue = issue;
}) })
.catch(() => { .catch(() => {
// Need this because our jQuery very kindly disables buttons on ALL form submissions // Need this because our jQuery very kindly disables buttons on ALL form submissions
Loading
Loading
Loading
@@ -4,7 +4,7 @@ class ListIssue {
Loading
@@ -4,7 +4,7 @@ class ListIssue {
this.title = obj.title; this.title = obj.title;
this.confidential = obj.confidential; this.confidential = obj.confidential;
this.dueDate = obj.due_date; this.dueDate = obj.due_date;
this.subscribed = true; this.subscribed = obj.subscribed;
this.labels = []; this.labels = [];
   
if (obj.assignee) { if (obj.assignee) {
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment