type: 'POST',
url: url,
data: data
- }).done(function() {
+ })
+ .done(function() {
that.options.detailView.updateAfterAction(true);
+ })
+ .fail(function(r) {
+ alert(r.responseJSON.errors ? _.pluck(r.responseJSON.errors, 'msg').join(' ') : r);
});
}
});
issue: this.options.issue.get('key'),
severity: this.ui.select.val()
}
- }).done(function() {
+ })
+ .done(function() {
that.options.detailView.updateAfterAction(true);
+ })
+ .fail(function(r) {
+ alert(r.responseJSON.errors ? _.pluck(r.responseJSON.errors, 'msg').join(' ') : r);
});
}
});
issue: this.options.issue.get('key'),
assignee: this.ui.select.val()
}
- }).done(function() {
+ })
+ .done(function() {
that.options.detailView.updateAfterAction(true);
+ })
+ .fail(function(r) {
+ alert(r.responseJSON.errors ? _.pluck(r.responseJSON.errors, 'msg').join(' ') : r);
});
}
});
issue: this.options.issue.get('key'),
plan: plan === '#unplan' ? '' : plan
}
- }).done(function() {
+ })
+ .done(function() {
that.options.detailView.updateAfterAction(true);
+ })
+ .fail(function(r) {
+ alert(r.responseJSON.errors ? _.pluck(r.responseJSON.errors, 'msg').join(' ') : r);
});
},
jQuery.ajax({
type: "POST",
url: baseUrl + "/issue/delete_comment?id=" + commentKey
- }).done(function() {
+ })
+ .done(function() {
that.updateAfterAction(true);
+ })
+ .fail(function(r) {
+ alert(r.responseJSON.errors ? _.pluck(r.responseJSON.errors, 'msg').join(' ') : r);
});
}
},
issue: this.model.get('key'),
transition: jQuery(e.target).data('transition')
}
- }).done(function() {
+ })
+ .done(function() {
that.resetIssue();
+ })
+ .fail(function(r) {
+ alert(r.responseJSON.errors ? _.pluck(r.responseJSON.errors, 'msg').join(' ') : r);
});
},
issue: this.model.get('key'),
assignee: window.SS.currentUser
}
- }).done(function() {
+ })
+ .done(function() {
that.resetIssue();
+ })
+ .fail(function(r) {
+ alert(r.responseJSON.errors ? _.pluck(r.responseJSON.errors, 'msg').join(' ') : r);
});
},
issue: this.model.get('key'),
actionKey: actionKey
}
- }).done(function() {
+ })
+ .done(function() {
that.resetIssue();
+ })
+ .fail(function(r) {
+ alert(r.responseJSON.errors ? _.pluck(r.responseJSON.errors, 'msg').join(' ') : r);
});
},