+ add the confirm story change feature of testcase.

This commit is contained in:
wangchunsheng
2010-03-30 04:07:21 +00:00
parent f3222d547b
commit d05261eab3
5 changed files with 45 additions and 4 deletions

View File

@@ -67,6 +67,14 @@ class testcase extends control
$childModuleIds = $this->tree->getAllChildId($moduleID);
$this->view->cases = $this->testcase->getModuleCases($productID, $childModuleIds, $orderBy, $pager);
}
elseif($browseType == 'needconfirm')
{
$this->view->cases = $this->dao->select('t1.*, t2.title AS storyTitle')->from(TABLE_CASE)->alias('t1')->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story = t2.id')
->where("t2.status = 'active'")
->andWhere('t2.version > t1.storyVersion')
->orderBy($orderBy)
->fetchAll();
}
elseif($browseType == 'bysearch')
{
if($this->session->testcaseQuery == false) $this->session->set('testcaseQuery', ' 1 = 1');
@@ -211,4 +219,13 @@ class testcase extends control
$this->assign('header', $header);
$this->display();
}
/* 确认需求变动。*/
public function confirmStoryChange($caseID)
{
$case = $this->testcase->getById($caseID);
$this->dao->update(TABLE_CASE)->set('storyVersion')->eq($case->latestStoryVersion)->where('id')->eq($caseID)->exec();
$this->loadModel('action')->create('case', $caseID, 'confirmed', '', $case->latestStoryVersion);
die(js::reload('parent'));
}
}