+ Add user and bug api.

This commit is contained in:
zhujinyong
2021-07-19 11:58:25 +08:00
parent 7bb10b58db
commit 37f44fbbca
19 changed files with 390 additions and 22 deletions
+7 -2
View File
@@ -564,14 +564,18 @@ class task extends control
$this->loadModel('action');
$changes = $this->task->assign($taskID);
if($this->viewType == 'json') return $this->send(array('result' => 'fail', 'message' => dao::getError()));
if(dao::isError()) die(js::error(dao::getError()));
if(dao::isError())
{
if($this->viewType == 'json') return $this->send(array('result' => 'fail', 'message' => dao::getError()));
die(js::error(dao::getError()));
}
$actionID = $this->action->create('task', $taskID, 'Assigned', $this->post->comment, $this->post->assignedTo);
$this->action->logHistory($actionID, $changes);
$this->executeHooks($taskID);
if($this->viewType == 'json') return $this->send(array('result' => 'success'));
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
}
@@ -787,6 +791,7 @@ class task extends control
}
}
if($this->viewType == 'json') return $this->send(array('result' => 'success'));
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
}