From 6fe88f5ec2ff42aa810df0f47b193a6bb599ed32 Mon Sep 17 00:00:00 2001 From: chujilu Date: Thu, 14 Aug 2014 10:35:13 +0800 Subject: [PATCH] * add testtask action in project --- module/action/lang/en.php | 2 ++ module/action/lang/zh-cn.php | 2 ++ module/testtask/control.php | 6 ++++++ 3 files changed, 10 insertions(+) diff --git a/module/action/lang/en.php b/module/action/lang/en.php index 5abda598ee..a046338073 100755 --- a/module/action/lang/en.php +++ b/module/action/lang/en.php @@ -95,6 +95,8 @@ $lang->action->desc->paused = '$date, paused by $actor. $lang->action->desc->diff1 = 'changed %s, old is "%s", new is "%s".
'; $lang->action->desc->diff2 = 'changed %s, the diff is:' . "\n" . "
%s
" . "\n"; $lang->action->desc->diff3 = "changed file's name %s to %s."; +$lang->action->desc->starttesttask = '$date, $actor start testtask $extra.' . "\n"; +$lang->action->desc->stoptesttask = '$date, $actor stop testtask $extra.' . "\n"; /* The action labels. */ $lang->action->label = new stdclass(); diff --git a/module/action/lang/zh-cn.php b/module/action/lang/zh-cn.php index 89926d6512..1687d65c49 100755 --- a/module/action/lang/zh-cn.php +++ b/module/action/lang/zh-cn.php @@ -95,6 +95,8 @@ $lang->action->desc->paused = '$date, 由 $actor 暂停 $lang->action->desc->diff1 = '修改了 %s,旧值为 "%s",新值为 "%s"。
' . "\n"; $lang->action->desc->diff2 = '修改了 %s,区别为:' . "\n" . "
%s
" . "\n"; $lang->action->desc->diff3 = '将文件名 %s 改为 %s 。' . "\n"; +$lang->action->desc->starttesttask = '$date, 由 $actor 启动测试任务 $extra。' . "\n"; +$lang->action->desc->stoptesttask = '$date, 由 $actor 关闭测试任务 $extra。' . "\n"; /* 用来显示动态信息。*/ $lang->action->label = new stdclass(); diff --git a/module/testtask/control.php b/module/testtask/control.php index 4ae736c513..fbd0f00a33 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -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')); }