diff --git a/module/bug/model.php b/module/bug/model.php
index ce4b6e0141..5c00b9575b 100644
--- a/module/bug/model.php
+++ b/module/bug/model.php
@@ -1222,7 +1222,7 @@ class bugModel extends model
*/
public function getStoryBugs($storyID)
{
- return $this->dao->select('id, title, type, status, assignedTo, resolvedBy, resolution')
+ return $this->dao->select('id, title, pri, type, status, assignedTo, resolvedBy, resolution')
->from(TABLE_BUG)
->where('story')->eq((int)$storyID)
->andWhere('deleted')->eq(0)
diff --git a/module/datatable/model.php b/module/datatable/model.php
index ca314eb86a..9cb2876a58 100644
--- a/module/datatable/model.php
+++ b/module/datatable/model.php
@@ -123,6 +123,16 @@ class datatableModel extends model
{
echo $this->lang->actions;
}
+ elseif($id == 'progess')
+ {
+ $this->app->loadLang('task');
+ echo $this->lang->task->progess;
+ }
+ elseif($id == 'taskCount' or $id == 'bugCount' or $id == 'caseCount')
+ {
+ $this->app->loadLang('story');
+ echo $this->lang->story->$id;
+ }
else
{
common::printOrderLink($id, $orderBy, $vars, $col->title);
diff --git a/module/product/view/datatabledata.html.php b/module/product/view/datatabledata.html.php
index ab4c677287..5d1aacadda 100644
--- a/module/product/view/datatabledata.html.php
+++ b/module/product/view/datatabledata.html.php
@@ -23,7 +23,7 @@ extract($widths);
- $value) $this->story->printCell($value, $story, $users, $branches, $storyStages, $modulePairs);?>
+ $value) $this->story->printCell($value, $story, $users, $branches, $storyStages, $modulePairs, $storyTasks, $storyBugs, $storyCases);?>
diff --git a/module/story/config.php b/module/story/config.php
index 1223186b60..6857e06ee5 100644
--- a/module/story/config.php
+++ b/module/story/config.php
@@ -89,6 +89,21 @@ $config->story->datatable->fieldList['stage']['fixed'] = 'no';
$config->story->datatable->fieldList['stage']['width'] = '90';
$config->story->datatable->fieldList['stage']['required'] = 'no';
+$config->story->datatable->fieldList['taskCount']['title'] = 'taskCount';
+$config->story->datatable->fieldList['taskCount']['fixed'] = 'no';
+$config->story->datatable->fieldList['taskCount']['width'] = '90';
+$config->story->datatable->fieldList['taskCount']['required'] = 'no';
+
+$config->story->datatable->fieldList['bugCount']['title'] = 'bugCount';
+$config->story->datatable->fieldList['bugCount']['fixed'] = 'no';
+$config->story->datatable->fieldList['bugCount']['width'] = '90';
+$config->story->datatable->fieldList['bugCount']['required'] = 'no';
+
+$config->story->datatable->fieldList['caseCount']['title'] = 'caseCount';
+$config->story->datatable->fieldList['caseCount']['fixed'] = 'no';
+$config->story->datatable->fieldList['caseCount']['width'] = '90';
+$config->story->datatable->fieldList['caseCount']['required'] = 'no';
+
$config->story->datatable->fieldList['openedBy']['title'] = 'openedByAB';
$config->story->datatable->fieldList['openedBy']['fixed'] = 'no';
$config->story->datatable->fieldList['openedBy']['width'] = '80';
diff --git a/module/story/control.php b/module/story/control.php
index 896e320bf1..6947b373cc 100644
--- a/module/story/control.php
+++ b/module/story/control.php
@@ -947,8 +947,9 @@ class story extends control
public function cases($storyID)
{
$this->loadModel('testcase');
- $this->view->cases = $this->testcase->getStoryCases($storyID);
- $this->view->users = $this->user->getPairs('noletter');
+ $this->view->cases = $this->testcase->getStoryCases($storyID);
+ $this->view->users = $this->user->getPairs('noletter');
+ $this->view->resultList = array('' => '') + $this->lang->testcase->resultList;
$this->display();
}
diff --git a/module/story/lang/en.php b/module/story/lang/en.php
index 8369a074ed..337f6ebb04 100644
--- a/module/story/lang/en.php
+++ b/module/story/lang/en.php
@@ -24,6 +24,8 @@ $lang->story->delete = "Delete";
$lang->story->view = "Story Details";
$lang->story->tasks = "Linked Task";
$lang->story->taskCount = 'Tasks';
+$lang->story->bugCount = 'Bugs';
+$lang->story->caseCount = 'Testcases';
$lang->story->taskCountAB = 'Tasks';
$lang->story->bugCountAB = 'Bugs';
$lang->story->caseCountAB = 'Cases';
diff --git a/module/story/lang/zh-cn.php b/module/story/lang/zh-cn.php
index 9d40fa9646..9c37325241 100644
--- a/module/story/lang/zh-cn.php
+++ b/module/story/lang/zh-cn.php
@@ -24,6 +24,8 @@ $lang->story->delete = "删除";
$lang->story->view = "需求详情";
$lang->story->tasks = "相关任务";
$lang->story->taskCount = '任务数';
+$lang->story->bugCount = 'Bug数';
+$lang->story->caseCount = '用例数';
$lang->story->taskCountAB = '任';
$lang->story->bugCountAB = 'Bug';
$lang->story->caseCountAB = '用';
diff --git a/module/story/model.php b/module/story/model.php
index 59c61b8f82..5331d9b884 100644
--- a/module/story/model.php
+++ b/module/story/model.php
@@ -2155,10 +2155,14 @@ class storyModel extends model
* @param array $users
* @param array $branches
* @param array $storyStages
+ * @param array $modulePairs
+ * @param array $storyTasks
+ * @param array $storyBugs
+ * @param array $storyCases
* @access public
* @return void
*/
- public function printCell($col, $story, $users, $branches, $storyStages, $modulePairs = array())
+ public function printCell($col, $story, $users, $branches, $storyStages, $modulePairs = array(), $storyTasks, $storyBugs, $storyCases)
{
$storyLink = helper::createLink('story', 'view', "storyID=$story->id");
$account = $this->app->user->account;
@@ -2217,6 +2221,18 @@ class storyModel extends model
echo "";
}
break;
+ case 'taskCount':
+ $tasksLink = helper::createLink('story', 'tasks', "storyID=$story->id");
+ $storyTasks[$story->id] > 0 ? print(html::a($tasksLink, $storyTasks[$story->id], '', 'class="iframe"')) : print(0);
+ break;
+ case 'bugCount':
+ $bugsLink = helper::createLink('story', 'bugs', "storyID=$story->id");
+ $storyBugs[$story->id] > 0 ? print(html::a($bugsLink, $storyBugs[$story->id], '', 'class="iframe"')) : print(0);
+ break;
+ case 'caseCount':
+ $casesLink = helper::createLink('story', 'cases', "storyID=$story->id");
+ $storyCases[$story->id] > 0 ? print(html::a($casesLink, $storyCases[$story->id], '', 'class="iframe"')) : print(0);
+ break;
case 'openedBy':
echo zget($users, $story->openedBy, $story->openedBy);
break;
diff --git a/module/testcase/model.php b/module/testcase/model.php
index d818f14a2e..e4150faf7f 100644
--- a/module/testcase/model.php
+++ b/module/testcase/model.php
@@ -391,7 +391,7 @@ class testcaseModel extends model
*/
public function getStoryCases($storyID)
{
- return $this->dao->select('id, title, type, status, lastRunner, lastRunDate, lastRunResult')
+ return $this->dao->select('id, title, pri, type, status, lastRunner, lastRunDate, lastRunResult')
->from(TABLE_CASE)
->where('story')->eq((int)$storyID)
->andWhere('deleted')->eq(0)