diff --git a/module/execution/test/execution.class.php b/module/execution/test/execution.class.php index 86d9e149d1..490b935eda 100644 --- a/module/execution/test/execution.class.php +++ b/module/execution/test/execution.class.php @@ -223,8 +223,9 @@ class executionTest foreach($object as $field => $defaultValue) $_POST[$field] = $defaultValue; foreach($param as $key => $value) $_POST[$key] = $value; + $_POST['uid'] = 0; - $change = $this->executionModel->update($objectID); + $change = $this->executionModel->update($objectID, (object)$_POST); if($change == array()) $change = '没有数据更新'; @@ -271,8 +272,9 @@ class executionTest foreach($createFields as $field => $defaultValue) $_POST[$field] = $defaultValue; foreach($param as $key => $value) $_POST[$key] = $value; + $_POST['uid'] = 0; - $object = $this->executionModel->batchUpdate(); + $object = $this->executionModel->batchUpdate((object)$_POST); unset($_POST); @@ -422,12 +424,13 @@ class executionTest { $data = date('Y-m-d'); - $createFields = array( 'comment' => '开始描述测试', 'realBegan' => $data); + $createFields = array('status' => 'doing', 'comment' => '开始描述测试', 'realBegan' => $data); foreach($createFields as $field => $defaultValue) $_POST[$field] = $defaultValue; foreach($param as $key => $value) $_POST[$key] = $value; + $_POST['uid'] = 0; - $obj = $this->executionModel->start($executionID); + $obj = $this->executionModel->start($executionID, (object)$_POST); unset($_POST); @@ -444,7 +447,9 @@ class executionTest $executionParent = $this->executionModel->getByID($execution->parent); return $executionParent; } - return $obj; + + foreach($obj as $change) $changes[$change['field']] = $change; + return $changes; } @@ -465,8 +470,9 @@ class executionTest foreach($createFields as $field => $defaultValue) $_POST[$field] = $defaultValue; foreach($param as $key => $value) $_POST[$key] = $value; + $_POST['uid'] = 0; - $obj = $this->executionModel->putoff($executionID); + $obj = $this->executionModel->putoff($executionID, (object)$_POST); unset($_POST); @@ -495,8 +501,9 @@ class executionTest foreach($createFields as $field => $defaultValue) $_POST[$field] = $defaultValue; foreach($param as $key => $value) $_POST[$key] = $value; + $_POST['uid'] = 0; - $obj = $this->executionModel->suspend($executionID); + $obj = $this->executionModel->suspend($executionID, (object)$_POST); unset($_POST); @@ -531,8 +538,9 @@ class executionTest foreach($createFields as $field => $defaultValue) $_POST[$field] = $defaultValue; foreach($param as $key => $value) $_POST[$key] = $value; + $_POST['uid'] = 0; - $obj = $this->executionModel->activate($executionID); + $obj = $this->executionModel->activate($executionID, (object)$_POST); unset($_POST); @@ -571,8 +579,9 @@ class executionTest foreach($createFields as $field => $defaultValue) $_POST[$field] = $defaultValue; foreach($param as $key => $value) $_POST[$key] = $value; + $_POST['uid'] = 0; - $obj = $this->executionModel->close($executionID); + $obj = $this->executionModel->close($executionID, (object)$_POST); unset($_POST); diff --git a/module/execution/test/model/start.php b/module/execution/test/model/start.php index 013a6f4565..ba27e71a24 100755 --- a/module/execution/test/model/start.php +++ b/module/execution/test/model/start.php @@ -21,7 +21,7 @@ pid=1 $executionIDList = array(2, 3, 4, 5); $execution = new executionTest(); -r($execution->startTest($executionIDList[0])) && p('1:field,old,new') && e('status,wait,doing'); // 敏捷执行开始 -r($execution->startTest($executionIDList[1])) && p('1:field,old,new') && e('status,wait,doing'); // 瀑布阶段开始 -r($execution->startTest($executionIDList[2])) && p('1:field,old,new') && e('status,wait,doing'); // 看板执行开始 -r($execution->startTest($executionIDList[3], array(), true)) && p('status') && e('doing'); // 子瀑布开启获取父瀑布状态 +r($execution->startTest($executionIDList[0])) && p('status:old,new') && e('wait,doing'); // 敏捷执行开始 +r($execution->startTest($executionIDList[1])) && p('status:old,new') && e('wait,doing'); // 瀑布阶段开始 +r($execution->startTest($executionIDList[2])) && p('status:old,new') && e('wait,doing'); // 看板执行开始 +r($execution->startTest($executionIDList[3], array(), true)) && p('status') && e('doing'); // 子瀑布开启获取父瀑布状态