diff --git a/module/testcase/control.php b/module/testcase/control.php index 1865407748..19dc79f1c0 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -998,7 +998,7 @@ class testcase extends control { if($_POST) { - $this->testcase->createFromImport($productID); + $this->testcase->createFromImport($productID, $branch); die(js::locate(inlink('browse', "productID=$productID"), 'parent')); } @@ -1125,7 +1125,7 @@ class testcase extends control $this->view->stories = $stories; $this->view->modules = $modules; - $this->view->cases = $this->dao->select('id, module, story')->from(TABLE_CASE)->where('product')->eq($productID)->andWhere('deleted')->eq(0)->fetchAll('id'); + $this->view->cases = $this->dao->select('id, module, story, stage, status, pri, type')->from(TABLE_CASE)->where('product')->eq($productID)->andWhere('deleted')->eq(0)->fetchAll('id'); $this->view->caseData = $caseData; $this->view->stepData = $stepData; $this->view->productID = $productID; diff --git a/module/testcase/model.php b/module/testcase/model.php index 6febd899db..58fa496d01 100644 --- a/module/testcase/model.php +++ b/module/testcase/model.php @@ -431,7 +431,7 @@ class testcaseModel extends model * @access public * @return void */ - public function createFromImport($productID) + public function createFromImport($productID, $branch = 0) { $this->loadModel('action'); $this->loadModel('story'); @@ -560,6 +560,7 @@ class testcaseModel extends model $caseData->version = 1; $caseData->openedBy = $this->app->user->account; $caseData->openedDate = $now; + $caseData->branch = $branch; $this->dao->insert(TABLE_CASE)->data($caseData)->autoCheck()->exec(); if(!dao::isError())