diff --git a/module/task/model.php b/module/task/model.php index 1fd43263ea..9b465960aa 100755 --- a/module/task/model.php +++ b/module/task/model.php @@ -3553,7 +3553,7 @@ class taskModel extends model public function updateParentStatus(int $taskID, int $parentID = 0, bool $createAction = true) :void { /* Get child task info. */ - $childTask = $this->dao->select('id,assignedTo,parent,path')->from(TABLE_TASK)->where('id')->eq($taskID)->fetch(); + $childTask = $this->dao->select('id,assignedTo,parent,path,realStarted')->from(TABLE_TASK)->where('id')->eq($taskID)->fetch(); if(empty($childTask)) return; $taskIdList = $childTask->path; diff --git a/module/task/tao.php b/module/task/tao.php index 26060dc3a9..d3c3c08ce8 100644 --- a/module/task/tao.php +++ b/module/task/tao.php @@ -1032,6 +1032,7 @@ class taskTao extends taskModel $data->assignedTo = !empty($childTask) ? $childTask->assignedTo : $task->openedBy; $data->assignedDate = $now; } + if($status == 'doing' && !empty($childTask->realStarted)) $data->realStarted = $childTask->realStarted; $data->finishedBy = ''; $data->finishedDate = null; diff --git a/module/task/test/tao/autoupdatetaskbystatus.php b/module/task/test/tao/autoupdatetaskbystatus.php index 5baa54987d..6cc8620f3f 100644 --- a/module/task/test/tao/autoupdatetaskbystatus.php +++ b/module/task/test/tao/autoupdatetaskbystatus.php @@ -64,7 +64,9 @@ su('user4'); $task = new taskTest(); -zenData('task')->gen(10); +$taskTable = zenData('task'); +$taskTable->story->range(0); +$taskTable->gen(10); $parentTask = new stdclass(); $parentTask->id = 1; diff --git a/module/testcase/config/table.php b/module/testcase/config/table.php index 5753b4273f..b04b4de552 100644 --- a/module/testcase/config/table.php +++ b/module/testcase/config/table.php @@ -83,10 +83,11 @@ $config->testcase->dtable->fieldList['openedDate']['type'] = 'date'; $config->testcase->dtable->fieldList['openedDate']['group'] = 4; $config->testcase->dtable->fieldList['openedDate']['sortType'] = true; -$config->testcase->dtable->fieldList['reviewedBy']['title'] = $lang->testcase->reviewedByAB; -$config->testcase->dtable->fieldList['reviewedBy']['type'] = 'user'; -$config->testcase->dtable->fieldList['reviewedBy']['group'] = 4; -$config->testcase->dtable->fieldList['reviewedBy']['sortType'] = true; +$config->testcase->dtable->fieldList['reviewedBy']['title'] = $lang->testcase->reviewedByAB; +$config->testcase->dtable->fieldList['reviewedBy']['type'] = 'user'; +$config->testcase->dtable->fieldList['reviewedBy']['group'] = 4; +$config->testcase->dtable->fieldList['reviewedBy']['sortType'] = true; +$config->testcase->dtable->fieldList['reviewedBy']['delimiter'] = true; $config->testcase->dtable->fieldList['reviewedDate']['title'] = $lang->testcase->reviewedDate; $config->testcase->dtable->fieldList['reviewedDate']['type'] = 'date';