* finish task #6433.

This commit is contained in:
wangyidong
2019-10-14 10:47:20 +08:00
parent e5dad96cd2
commit e44a602127
4 changed files with 14 additions and 3 deletions
+1 -1
View File
@@ -838,7 +838,7 @@ class actionModel extends model
}
$action->objectLink = helper::createLink($moduleName, $methodName, sprintf($vars, $action->objectID));
if($action->objectType == 'user') $action->objectLink = helper::createLink($moduleName, $methodName, sprintf($vars, $action->actor));
if($action->objectType == 'user') $action->objectLink = helper::createLink($moduleName, $methodName, sprintf($vars, $action->objectName));
$action->objectLabel = $objectLabel;
}
else
+11 -1
View File
@@ -482,7 +482,15 @@ class testcase extends control
{
$case = $this->testcase->getById($caseID, $version);
if(!$case) die(js::error($this->lang->notFound) . js::locate('back'));
if($from == 'testtask') $run = $this->loadModel('testtask')->getRunByCase($taskID, $caseID);
if($from == 'testtask')
{
$run = $this->loadModel('testtask')->getRunByCase($taskID, $caseID);
$case->assignedTo = $run->assignedTo;
$case->lastRunner = $run->lastRunner;
$case->lastRunDate = $run->lastRunDate;
$case->lastRunResult = $run->lastRunResult;
$case->status = $run->status;
}
$branches = $this->session->currentProductType == 'normal' ? array() : $this->loadModel('branch')->getPairs($case->product);
$isLibCase = ($case->lib and empty($case->product));
@@ -1077,6 +1085,7 @@ class testcase extends control
if($product->type != 'normal') $this->lang->testcase->branch = $this->lang->product->branchName[$product->type];
if($_POST)
{
$this->app->loadLang('testtask');
$caseLang = $this->lang->testcase;
$caseConfig = $this->config->testcase;
@@ -1122,6 +1131,7 @@ class testcase extends control
$row->id = $caseID;
}
}
if($taskID) $caseLang->statusList = $this->lang->testtask->statusList;
$stmt = $this->dao->select('t1.*')->from(TABLE_TESTRESULT)->alias('t1')
->leftJoin(TABLE_TESTRUN)->alias('t2')->on('t1.run=t2.id')
+1
View File
@@ -289,6 +289,7 @@ class testtask extends control
$this->config->testcase->search['module'] = 'testtask';
$this->config->testcase->search['params']['product']['values'] = array($productID => $this->products[$productID], 'all' => $this->lang->testcase->allProduct);
$this->config->testcase->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($productID, $viewType = 'case');
$this->config->testcase->search['params']['status']['values'] = array('' => '') + $this->lang->testtask->statusList;
$this->config->testcase->search['queryID'] = $queryID;
$this->config->testcase->search['fields']['assignedTo'] = $this->lang->testtask->assignedTo;
+1 -1
View File
@@ -852,7 +852,7 @@ class testtaskModel extends model
}
$caseQuery = preg_replace('/`(\w+)`/', 't2.`$1`', $caseQuery);
$caseQuery = str_replace(array('t2.`assignedTo`', 't2.`lastRunner`', 't2.`lastRunDate`', 't2.`lastRunResult`'), array('t1.`assignedTo`', 't1.`lastRunner`', 't1.`lastRunDate`', 't1.`lastRunResult`'), $caseQuery);
$caseQuery = str_replace(array('t2.`assignedTo`', 't2.`lastRunner`', 't2.`lastRunDate`', 't2.`lastRunResult`', 't2.`status`'), array('t1.`assignedTo`', 't1.`lastRunner`', 't1.`lastRunDate`', 't1.`lastRunResult`', 't1.`status`'), $caseQuery);
$runs = $this->dao->select('t2.*,t1.*, t2.version as caseVersion,t3.title as storyTitle,t2.status as caseStatus')->from(TABLE_TESTRUN)->alias('t1')
->leftJoin(TABLE_CASE)->alias('t2')->on('t1.case = t2.id')
->leftJoin(TABLE_STORY)->alias('t3')->on('t2.story = t3.id')