Commit 3f713db0 authored by Simon Knox's avatar Simon Knox

update correct field for Notes - it's called note not description

parent ced971b1
......@@ -14,6 +14,7 @@ require('./task_list');
if ($('a.btn-close').length) {
this.taskList = new gl.TaskList({
dataType: 'issue',
fieldName: 'description',
selector: '.detail-page-description',
onSuccess: (result) => {
document.querySelector('#task_status').innerText = result.task_status;
......
......@@ -29,6 +29,7 @@ require('./merge_request_tabs');
if ($("a.btn-close").length) {
this.taskList = new gl.TaskList({
dataType: 'merge_request',
fieldName: 'description',
selector: '.detail-page-description',
onSuccess: (result) => {
document.querySelector('#task_status').innerText = result.task_status;
......
......@@ -53,6 +53,7 @@ require('./task_list');
this.setupMainTargetNoteForm();
this.taskList = new gl.TaskList({
dataType: 'note',
fieldName: 'note',
selector: '.notes'
});
this.collapseLongCommitList();
......
......@@ -4,6 +4,7 @@ class TaskList {
constructor(options = {}) {
this.selector = options.selector;
this.dataType = options.dataType;
this.fieldName = options.fieldName;
this.onSuccess = options.onSuccess || (() => {});
this.init();
}
......@@ -24,7 +25,7 @@ class TaskList {
const $target = $(e.target);
const patchData = {};
patchData[this.dataType] = {
description: $target.val(),
[this.fieldName]: $target.val(),
};
return $.ajax({
type: 'PATCH',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment