* fix a bug.

This commit is contained in:
wangyidong
2014-08-21 01:54:42 +00:00
parent 60595ffa00
commit 5d2a658222
4 changed files with 26 additions and 24 deletions
+8 -7
View File
@@ -227,19 +227,20 @@ class testcase extends control
$response['message'] = '';
$caseResult = $this->testcase->create($bugID);
$caseID = $caseResult['id'];
if(!$caseResult or dao::isError())
{
$response['result'] = 'fail';
$response['message'] = dao::getError();
$this->send($response);
}
$caseID = $caseResult['id'];
if($caseResult['status'] == 'existed')
{
$response['locate'] = $this->createLink('testcase', 'view', "caseID=$caseID");
$this->send($response);
}
if(dao::isError())
{
$response['result'] = 'fail';
$response['message'] = dao::getError();
$this->send($response);
}
$this->loadModel('action');
$this->action->create('case', $caseID, 'Opened');
$response['locate'] = $this->createLink('testcase', 'browse', "productID=$_POST[product]&browseType=byModule&param=$_POST[module]");