* [task#134177,done,4h] modify action desc for run testcase.
This commit is contained in:
@@ -242,9 +242,10 @@ $lang->action->desc->linked2bug = '$date Verknüpft mit <strong>$extra
|
||||
$lang->action->desc->linked2testtask = '$date, linked to <strong>$extra</strong> by <strong>$actor</strong>';
|
||||
$lang->action->desc->unlinkedfromtesttask = '$date, unlinked from <strong>$extra</strong> by <strong>$actor</strong>';
|
||||
$lang->action->desc->resolved = '$date, resolved by <strong>$actor</strong> ' . "\n";
|
||||
$lang->action->desc->managed = '$date, by <strong>$actor</strong> managed.' . "\n";
|
||||
$lang->action->desc->estimated = '$date, by <strong>$actor</strong> estimated.' . "\n";
|
||||
$lang->action->desc->run = '$date, by <strong>$actor</strong> executed.' . "\n";
|
||||
$lang->action->desc->managed = '$date, managed by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->estimated = '$date, estimated by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->run = '$date, executed by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->runresult = '$date, executed by <strong>$actor</strong>%s, the results is <span class="text-%s font-bold">%s</span>.' . "\n";
|
||||
$lang->action->desc->syncprogram = '$date, started by <strong>$actor</strong>(starting the project sets the program status as Ongoing).' . "\n";
|
||||
$lang->action->desc->syncproject = '$date, starting the execution sets the ' . $lang->projectCommon . ' status as Ongoing.' . "\n";
|
||||
$lang->action->desc->syncmultipleproject = '$date, starting the task sets the ' . $lang->projectCommon . ' status as Ongoing.' . "\n";
|
||||
|
||||
@@ -242,9 +242,10 @@ $lang->action->desc->linked2bug = '$date, linked to <strong>$extra</st
|
||||
$lang->action->desc->linked2testtask = '$date, linked to <strong>$extra</strong> by <strong>$actor</strong>';
|
||||
$lang->action->desc->unlinkedfromtesttask = '$date, unlinked from <strong>$extra</strong> by <strong>$actor</strong>';
|
||||
$lang->action->desc->resolved = '$date, resolved by <strong>$actor</strong> ' . "\n";
|
||||
$lang->action->desc->managed = '$date, by <strong>$actor</strong> managed.' . "\n";
|
||||
$lang->action->desc->estimated = '$date, by <strong>$actor</strong> estimated.' . "\n";
|
||||
$lang->action->desc->run = '$date, by <strong>$actor</strong> executed.' . "\n";
|
||||
$lang->action->desc->managed = '$date, managed by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->estimated = '$date, estimated by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->run = '$date, executed by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->runresult = '$date, executed by <strong>$actor</strong>%s, the results is <span class="text-%s font-bold">%s</span>.' . "\n";
|
||||
$lang->action->desc->syncprogram = '$date, started by <strong>$actor</strong>(starting the project sets the program status as Ongoing).' . "\n";
|
||||
$lang->action->desc->syncproject = '$date, starting the execution sets the ' . $lang->projectCommon . ' status as Ongoing.' . "\n";
|
||||
$lang->action->desc->syncmultipleproject = '$date, starting the task sets the ' . $lang->projectCommon . ' status as Ongoing.' . "\n";
|
||||
|
||||
@@ -242,9 +242,10 @@ $lang->action->desc->linked2bug = '$date, affecté à <strong>$extra</
|
||||
$lang->action->desc->linked2testtask = '$date, linked to <strong>$extra</strong> by <strong>$actor</strong>';
|
||||
$lang->action->desc->unlinkedfromtesttask = '$date, unlinked from <strong>$extra</strong> by <strong>$actor</strong>';
|
||||
$lang->action->desc->resolved = '$date, resolved by <strong>$actor</strong> ' . "\n";
|
||||
$lang->action->desc->managed = '$date, by <strong>$actor</strong> managed.' . "\n";
|
||||
$lang->action->desc->estimated = '$date, by <strong>$actor</strong> estimated.' . "\n";
|
||||
$lang->action->desc->run = '$date, by <strong>$actor</strong> executed.' . "\n";
|
||||
$lang->action->desc->managed = '$date, managed by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->estimated = '$date, estimated by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->run = '$date, executed by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->runresult = '$date, executed by <strong>$actor</strong>%s, the results is <span class="text-%s font-bold">%s</span>.' . "\n";
|
||||
$lang->action->desc->syncprogram = '$date, started by <strong>$actor</strong>(starting the project sets the program status as Ongoing).' . "\n";
|
||||
$lang->action->desc->syncproject = '$date, starting the execution sets the ' . $lang->projectCommon . ' status as Ongoing.' . "\n";
|
||||
$lang->action->desc->syncmultipleproject = '$date, starting the task sets the ' . $lang->projectCommon . ' status as Ongoing.' . "\n";
|
||||
|
||||
@@ -245,6 +245,7 @@ $lang->action->desc->resolved = '$date, 由 <strong>$actor</strong>
|
||||
$lang->action->desc->managed = '$date, 由 <strong>$actor</strong> 维护。' . "\n";
|
||||
$lang->action->desc->estimated = '$date, 由 <strong>$actor</strong> 估算。' . "\n";
|
||||
$lang->action->desc->run = '$date, 由 <strong>$actor</strong> 执行。' . "\n";
|
||||
$lang->action->desc->runresult = '$date, 由 <strong>$actor</strong> 执行%s,结果为 <span class="text-%s font-bold">%s</span>。' . "\n";
|
||||
$lang->action->desc->syncprogram = '$date, 由 <strong>$actor</strong> 启动(因' . $lang->projectCommon . '开始而启动项目集)。' . "\n";
|
||||
$lang->action->desc->syncproject = '$date, 系统判断由于' . $lang->executionCommon .'开始,将' . $lang->projectCommon . '状态置为进行中。' . "\n";
|
||||
$lang->action->desc->syncmultipleproject = '$date, 系统判断由于任务开始,将' . $lang->projectCommon . '状态置为进行中。' . "\n";
|
||||
|
||||
@@ -694,6 +694,22 @@ class actionModel extends model
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif($action->action == 'run' && $action->objectType == 'case' && strpos($action->extra, ',') !== false)
|
||||
{
|
||||
list($testtaskID, $result) = explode(',', $action->extra);
|
||||
if($result)
|
||||
{
|
||||
$link = '';
|
||||
$testtask = $this->dao->select('name')->from(TABLE_TESTTASK)->where('id')->eq($testtaskID)->fetch();
|
||||
if($testtask) $link = common::hasPriv('testtask', 'cases') ? html::a(helper::createLink('testtask', 'cases', "testtaskID=$testtaskID"), ' ' . $testtask->name) : ' ' . $testtask->name;
|
||||
if(!isset($this->lang->testcase->resultList)) $this->app->loadLang('testcase');
|
||||
$desc = sprintf($this->lang->action->desc->runresult, "<strong>{$link}</strong>", $result, zget($this->lang->testcase->resultList, $result));
|
||||
}
|
||||
else
|
||||
{
|
||||
$desc = $this->lang->action->desc->run;
|
||||
}
|
||||
}
|
||||
elseif(isset($this->lang->action->desc->{$actionType}))
|
||||
{
|
||||
$desc = $this->lang->action->desc->{$actionType};
|
||||
|
||||
@@ -883,7 +883,7 @@ class testtask extends control
|
||||
$caseResult = $this->testtask->createResult($runID, (int)$this->post->case, (int)$this->post->version, $stepResults, $deployID);
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
$this->loadModel('action')->create('case', $caseID, 'run', '', zget($run, 'task', 0));
|
||||
$this->loadModel('action')->create('case', $caseID, 'run', '', zget($run, 'task', '0') . ',' . $caseResult);
|
||||
|
||||
$this->testtaskZen->responseAfterRunCase($caseResult, $preAndNext, $run, $caseID, $version);
|
||||
return $this->send(array('result' => 'success', 'load' => true, 'closeModal' => true));
|
||||
|
||||
Reference in New Issue
Block a user