* add testtask action in project

This commit is contained in:
chujilu
2014-08-14 10:35:13 +08:00
parent ee735923f6
commit 6fe88f5ec2
3 changed files with 10 additions and 0 deletions
+2
View File
@@ -95,6 +95,8 @@ $lang->action->desc->paused = '$date, paused by <strong>$actor</strong>.
$lang->action->desc->diff1 = 'changed <strong><i>%s</i></strong>, old is "%s", new is "%s".<br />';
$lang->action->desc->diff2 = 'changed <strong><i>%s</i></strong>, the diff is:' . "\n" . "<blockquote>%s</blockquote>" . "\n<div class='hidden'>%s</div>";
$lang->action->desc->diff3 = "changed file's name %s to %s.";
$lang->action->desc->starttesttask = '$date, <strong>$actor</strong> start testtask <strong>$extra</strong>.' . "\n";
$lang->action->desc->stoptesttask = '$date, <strong>$actor</strong> stop testtask <strong>$extra</strong>.' . "\n";
/* The action labels. */
$lang->action->label = new stdclass();
+2
View File
@@ -95,6 +95,8 @@ $lang->action->desc->paused = '$date, 由 <strong>$actor</strong> 暂停
$lang->action->desc->diff1 = '修改了 <strong><i>%s</i></strong>,旧值为 "%s",新值为 "%s"。<br />' . "\n";
$lang->action->desc->diff2 = '修改了 <strong><i>%s</i></strong>,区别为:' . "\n" . "<blockquote>%s</blockquote>" . "\n<div class='hidden'>%s</div>";
$lang->action->desc->diff3 = '将文件名 %s 改为 %s 。' . "\n";
$lang->action->desc->starttesttask = '$date, 由 <strong>$actor</strong> 启动测试任务 <strong>$extra</strong>。' . "\n";
$lang->action->desc->stoptesttask = '$date, 由 <strong>$actor</strong> 关闭测试任务 <strong>$extra</strong>。' . "\n";
/* 用来显示动态信息。*/
$lang->action->label = new stdclass();
+6
View File
@@ -438,6 +438,9 @@ class testtask extends control
{
$actionID = $this->action->create('testtask', $taskID, 'Started', $this->post->comment);
$this->action->logHistory($actionID, $changes);
$testtask = $this->testtask->getById($taskID);
$projectActionID = $this->action->create('project', $testtask->project, 'starttesttask', '', $taskID);
}
die(js::locate($this->createLink('testtask', 'view', "taskID=$taskID"), 'parent'));
}
@@ -477,6 +480,9 @@ class testtask extends control
{
$actionID = $this->action->create('testtask', $taskID, 'Closed', $this->post->comment);
$this->action->logHistory($actionID, $changes);
$testtask = $this->testtask->getById($taskID);
$projectActionID = $this->action->create('project', $testtask->project, 'stoptesttask', '', $taskID);
}
die(js::locate($this->createLink('testtask', 'view', "taskID=$taskID"), 'parent'));
}