* Fix bug of sonarqube.
This commit is contained in:
@@ -70,7 +70,7 @@ class task extends control
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
list($task, $testTasks, $existTaskID) = $result;
|
||||
if($existTaskID) return $this->send(array('result' => 'success', 'message' => sprintf($this->lang->duplicate, $this->lang->task->common), 'locate' => $this->createLink('task', 'view', "taskID={$existTaskID}")));
|
||||
if($existTaskID) return $this->send(array('result' => 'success', 'message' => sprintf($this->lang->duplicate, $this->lang->task->common), 'locate' => $this->createLink('task', 'view', "taskID={$existTaskID}")));
|
||||
|
||||
/* Create task. */
|
||||
$taskIdList = $this->task->create($task, $this->post->assignedTo, (int)$this->post->multiple, $this->post->team, (bool)$this->post->selectTestStory);
|
||||
@@ -81,7 +81,7 @@ class task extends control
|
||||
$columnID = isset($output['columnID']) ? (int)$output['columnID'] : 0;
|
||||
$this->task->afterCreate($task, $taskIdList, $bugID, $todoID, $testTasks);
|
||||
$this->task->updateKanbanData($execution, $task, (int)$_POST['lane'], $columnID);
|
||||
setcookie('lastTaskModule', (int)$_POST['module'], $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, false);
|
||||
setcookie('lastTaskModule', (int)$_POST['module'], $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, true);
|
||||
|
||||
/* Get the information returned after a task is created. */
|
||||
$response = $this->taskZen->responseAfterCreate($task, $execution, $_POST['after']);
|
||||
@@ -704,7 +704,7 @@ class task extends control
|
||||
$kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, $execLaneType, 'id_desc', 0, $execGroupBy, $rdSearchValue);
|
||||
$kanbanData = json_encode($kanbanData);
|
||||
|
||||
return print(js::reload('parent') . js::execute("parent.parent.updateKanban($kanbanData)"));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
if($from == 'taskkanban')
|
||||
{
|
||||
@@ -714,9 +714,9 @@ class task extends control
|
||||
$kanbanData = $kanbanData[$kanbanType];
|
||||
$kanbanData = json_encode($kanbanData);
|
||||
|
||||
return print(js::reload('parent') . js::execute("parent.parent.updateKanban(\"task\", $kanbanData)"));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
return print(js::reload('parent') . js::execute("if(typeof(parent.parent.ajaxRefresh) == 'function') parent.parent.ajaxRefresh()"));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
return print(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
|
||||
}
|
||||
@@ -1521,7 +1521,7 @@ class task extends control
|
||||
->limit(50)
|
||||
->fetchAll('id');
|
||||
|
||||
if(empty($tasks)) die('');
|
||||
if(empty($tasks)) return print('');
|
||||
|
||||
$parentGroup = $this->dao->select('*')->from(TABLE_TASK)
|
||||
->where('parent')->in(array_keys($tasks))
|
||||
@@ -1550,7 +1550,7 @@ class task extends control
|
||||
$list .= $this->task->buildNestedList($execution, $task, false, $showmore, $users);
|
||||
}
|
||||
|
||||
die($list);
|
||||
return print($list);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+13
-13
@@ -358,7 +358,7 @@ class taskZen extends task
|
||||
/**
|
||||
* 展示看板相关变量。
|
||||
* Show related variable about the Kanban.
|
||||
*
|
||||
*
|
||||
* @param int $executionID
|
||||
* @param array $output
|
||||
* @access private
|
||||
@@ -459,8 +459,8 @@ class taskZen extends task
|
||||
* 处理创建任务的请求数据。
|
||||
* Process the request data for the creation task.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @param object $formData
|
||||
* @param int $executionID
|
||||
* @param object $formData
|
||||
* @access private
|
||||
* @return object
|
||||
*/
|
||||
@@ -521,10 +521,10 @@ class taskZen extends task
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查规定时间内是否创建了同名任务。
|
||||
* 检查规定时间内是否创建了同名任务。
|
||||
* Check whether a task with the same name is created within the specified time.
|
||||
*
|
||||
* @param object $task
|
||||
*
|
||||
* @param object $task
|
||||
* @access private
|
||||
* @return int
|
||||
*/
|
||||
@@ -542,9 +542,9 @@ class taskZen extends task
|
||||
/**
|
||||
* 处理关联需求的测试子任务的请求数据。
|
||||
* Process request data for test subtasks related to stories.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @param object $formData
|
||||
*
|
||||
* @param int $executionID
|
||||
* @param object $formData
|
||||
* @access private
|
||||
* @return array|bool
|
||||
*/
|
||||
@@ -579,10 +579,10 @@ class taskZen extends task
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查关联需求的测试类型任务数据格式是否符合要求。
|
||||
* 检查关联需求的测试类型任务数据格式是否符合要求。
|
||||
* Check if the test type task data format of the linked stories meets the requirements.
|
||||
*
|
||||
* @param object[] $tasks
|
||||
*
|
||||
* @param object[] $tasks
|
||||
* @access private
|
||||
* @return bool
|
||||
*/
|
||||
@@ -713,7 +713,7 @@ class taskZen extends task
|
||||
/* Set the response to return task list. */
|
||||
elseif($afterChoice == 'toTaskList')
|
||||
{
|
||||
setcookie('moduleBrowseParam', 0, 0, $this->config->webRoot, '', $this->config->cookieSecure, false);
|
||||
setcookie('moduleBrowseParam', 0, 0, $this->config->webRoot, '', $this->config->cookieSecure, true);
|
||||
$response['locate'] = $this->createLink('execution', 'task', "executionID=$executionID&status=unclosed¶m=0&orderBy=id_desc");
|
||||
}
|
||||
/* Set the response to return story list. */
|
||||
|
||||
Reference in New Issue
Block a user