diff --git a/module/action/model.php b/module/action/model.php
index 484de5dafb..3dc6f84ec2 100755
--- a/module/action/model.php
+++ b/module/action/model.php
@@ -197,6 +197,14 @@ class actionModel extends model
->orderBy('date, id')->fetchAll('id');
$histories = $this->getHistory(array_keys($actions));
$this->loadModel('file');
+
+ if($objectType == 'project')
+ {
+ $this->app->loadLang('build');
+ $this->app->loadLang('testtask');
+ $actions = $this->processProjectActions($actions);
+ }
+
foreach($actions as $actionID => $action)
{
$actionName = strtolower($action->action);
@@ -227,18 +235,41 @@ class actionModel extends model
{
$action->extra = html::a(helper::createLink('bug', 'view', "bugID=$action->extra"), $action->extra);
}
+ elseif($actionName == 'unlinkedfromproject')
+ {
+ $name = $this->dao->select('name')->from(TABLE_PRODUCT)->where('id')->eq($action->extra)->fetch('name');
+ if($name) $action->extra = html::a(helper::createLink('product', 'browse', "productID=$action->extra"), "#$action->extra " . $name);
+ }
+ elseif($actionName == 'unlinkedfromplan')
+ {
+ $title = $this->dao->select('title')->from(TABLE_PRODUCTPLAN)->where('id')->eq($action->extra)->fetch('title');
+ if($title) $action->extra = html::a(helper::createLink('productplan', 'view', "planID=$action->extra"), "#$action->extra " . $title);
+ }
+ elseif($actionName == 'tostory')
+ {
+ $title = $this->dao->select('title')->from(TABLE_STORY)->where('id')->eq($action->extra)->fetch('title');
+ if($title) $action->extra = html::a(helper::createLink('story', 'view', "storyID=$action->extra"), "#$action->extra " . $title);
+ }
+ elseif($actionName == 'totask')
+ {
+ $name = $this->dao->select('name')->from(TABLE_TASK)->where('id')->eq($action->extra)->fetch('name');
+ if($name) $action->extra = html::a(helper::createLink('task', 'view', "taskID=$action->extra"), "#$action->extra " . $name);
+ }
+ elseif($actionName == 'buildopened')
+ {
+ $name = $this->dao->select('name')->from(TABLE_BUILD)->where('id')->eq($action->objectID)->fetch('name');
+ if($name) $action->extra = html::a(helper::createLink('build', 'view', "buildID=$action->objectID"), "#$action->objectID " . $name);
+ }
+ elseif($actionName == 'testtaskopened' or $actionName == 'testtaskstarted' or $actionName == 'testtaskclosed')
+ {
+ $name = $this->dao->select('name')->from(TABLE_TESTTASK)->where('id')->eq($action->objectID)->fetch('name');
+ if($name) $action->extra = html::a(helper::createLink('testtask', 'view', "testtaskID=$action->objectID"), "#$action->objectID " . $name);
+ }
$action->history = isset($histories[$actionID]) ? $histories[$actionID] : array();
$action->comment = $this->file->setImgSize($action->comment, $this->config->action->commonImgSize);
$actions[$actionID] = $action;
}
- if($objectType == 'project')
- {
- $this->app->loadLang('build');
- $this->app->loadLang('testtask');
- return $this->processProjectActions($actions);
- }
-
return $actions;
}
diff --git a/module/build/lang/en.php b/module/build/lang/en.php
index d6f5074f54..9f90dc8016 100644
--- a/module/build/lang/en.php
+++ b/module/build/lang/en.php
@@ -57,4 +57,4 @@ $lang->build->placeholder->scmPath = 'Software source code repository, such as
$lang->build->placeholder->filePath = 'The path of this build package to download';
$lang->build->action = new stdclass();
-$lang->build->action->buildopened = '$date, $actor created build. $objectID。' . "\n";
+$lang->build->action->buildopened = '$date, $actor created build. $extra。' . "\n";
diff --git a/module/build/lang/zh-cn.php b/module/build/lang/zh-cn.php
index 1637c5f3e5..769bf7443d 100644
--- a/module/build/lang/zh-cn.php
+++ b/module/build/lang/zh-cn.php
@@ -57,4 +57,4 @@ $lang->build->placeholder->scmPath = ' 软件源代码库,如Subversion、Git
$lang->build->placeholder->filePath = ' 该版本软件包下载存储地址';
$lang->build->action = new stdclass();
-$lang->build->action->buildopened = '$date, 由 $actor 创建版本 $objectID。' . "\n";
+$lang->build->action->buildopened = '$date, 由 $actor 创建版本 $extra。' . "\n";
diff --git a/module/testtask/lang/en.php b/module/testtask/lang/en.php
index 6457b0bddb..da7992bcf2 100644
--- a/module/testtask/lang/en.php
+++ b/module/testtask/lang/en.php
@@ -105,6 +105,6 @@ $lang->testtask->mail->edit->title = "%s finished testtask #%s:%s";
$lang->testtask->testScope = 'Test scope';
$lang->testtask->action = new stdclass();
-$lang->testtask->action->testtaskopened = '$date, 由 $actor opened test task. $objectID。' . "\n";
-$lang->testtask->action->testtaskstarted = '$date, 由 $actor started test task. $objectID。' . "\n";
-$lang->testtask->action->testtaskclosed = '$date, 由 $actor finished test task. $objectID。' . "\n";
+$lang->testtask->action->testtaskopened = '$date, 由 $actor opened test task. $extra。' . "\n";
+$lang->testtask->action->testtaskstarted = '$date, 由 $actor started test task. $extra。' . "\n";
+$lang->testtask->action->testtaskclosed = '$date, 由 $actor finished test task. $extra。' . "\n";
diff --git a/module/testtask/lang/zh-cn.php b/module/testtask/lang/zh-cn.php
index 85184dd5bf..ef00df9955 100644
--- a/module/testtask/lang/zh-cn.php
+++ b/module/testtask/lang/zh-cn.php
@@ -105,6 +105,6 @@ $lang->testtask->mail->edit->title = "%s编辑了版本 #%s:%s";
$lang->testtask->testScope = '测试范畴';
$lang->testtask->action = new stdclass();
-$lang->testtask->action->testtaskopened = '$date, 由 $actor 创建版本 $objectID。' . "\n";
-$lang->testtask->action->testtaskstarted = '$date, 由 $actor 启动版本 $objectID。' . "\n";
-$lang->testtask->action->testtaskclosed = '$date, 由 $actor 完成版本 $objectID。' . "\n";
+$lang->testtask->action->testtaskopened = '$date, 由 $actor 创建版本 $extra。' . "\n";
+$lang->testtask->action->testtaskstarted = '$date, 由 $actor 启动版本 $extra。' . "\n";
+$lang->testtask->action->testtaskclosed = '$date, 由 $actor 完成版本 $extra。' . "\n";