* fix a bug for branch.

This commit is contained in:
wangyidong
2015-12-01 11:03:08 +08:00
parent b808b0c8c3
commit a2b2454760
2 changed files with 4 additions and 3 deletions

View File

@@ -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;

View File

@@ -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())