* finish task #2940.
This commit is contained in:
@@ -24,7 +24,7 @@ $config->bug->list->allFields = 'id, module, project, story, task,
|
||||
lastEditedDate';
|
||||
$config->bug->list->defaultFields = 'id,severity,pri,title,openedBy,assignedTo,resolvedBy,resolution';
|
||||
|
||||
$config->bug->list->exportFields = 'id, product, module, project, story, task,
|
||||
$config->bug->list->exportFields = 'id, product, branch, module, project, story, task,
|
||||
title, keywords, severity, pri, type, os, browser,
|
||||
steps, status, activatedCount, confirmed, mailto,
|
||||
openedBy, openedDate, openedBuild,
|
||||
|
||||
@@ -1310,6 +1310,7 @@ class bug extends control
|
||||
$relatedBugIdList = array();
|
||||
$relatedCaseIdList = array();
|
||||
$relatedBuildIdList = array();
|
||||
$relatedBranchIdList = array();
|
||||
|
||||
foreach($bugs as $bug)
|
||||
{
|
||||
@@ -1318,6 +1319,7 @@ class bug extends control
|
||||
$relatedTaskIdList[$bug->task] = $bug->task;
|
||||
$relatedCaseIdList[$bug->case] = $bug->case;
|
||||
$relatedBugIdList[$bug->duplicateBug] = $bug->duplicateBug;
|
||||
$relatedBranchIdList[$bug->branch] = $bug->branch;
|
||||
|
||||
/* Process link bugs. */
|
||||
$linkBugs = explode(',', $bug->linkBug);
|
||||
@@ -1341,6 +1343,7 @@ class bug extends control
|
||||
$relatedTasks = $this->dao->select('id, name')->from(TABLE_TASK)->where('id')->in($relatedTaskIdList)->fetchPairs();
|
||||
$relatedBugs = $this->dao->select('id, title')->from(TABLE_BUG)->where('id')->in($relatedBugIdList)->fetchPairs();
|
||||
$relatedCases = $this->dao->select('id, title')->from(TABLE_CASE)->where('id')->in($relatedCaseIdList)->fetchPairs();
|
||||
$relatedBranch = $this->dao->select('id, name')->from(TABLE_BRANCH)->where('id')->in($relatedBranchIdList)->fetchPairs();
|
||||
$relatedBuilds = array('trunk' => $this->lang->trunk) + $this->dao->select('id, name')->from(TABLE_BUILD)->where('id')->in($relatedBuildIdList)->fetchPairs();
|
||||
$relatedFiles = $this->dao->select('id, objectID, pathname, title')->from(TABLE_FILE)->where('objectType')->eq('bug')->andWhere('objectID')->in(@array_keys($bugs))->fetchGroup('objectID');
|
||||
|
||||
@@ -1364,6 +1367,7 @@ class bug extends control
|
||||
if(isset($relatedBugs[$bug->duplicateBug])) $bug->duplicateBug = $relatedBugs[$bug->duplicateBug] . "($bug->duplicateBug)";
|
||||
if(isset($relatedCases[$bug->case])) $bug->case = $relatedCases[$bug->case] . "($bug->case)";
|
||||
if(isset($relatedBuilds[$bug->resolvedBuild])) $bug->resolvedBuild = $relatedBuilds[$bug->resolvedBuild] . "(#$bug->resolvedBuild)";
|
||||
if(isset($relatedBranch[$bug->branch])) $bug->branch = $relatedBranch[$bug->branch] . "(#$bug->branch)";
|
||||
|
||||
if(isset($bugLang->priList[$bug->pri])) $bug->pri = $bugLang->priList[$bug->pri];
|
||||
if(isset($bugLang->typeList[$bug->type])) $bug->type = $bugLang->typeList[$bug->type];
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
$lang->bug->common = 'Bug';
|
||||
$lang->bug->id = 'Bug编号';
|
||||
$lang->bug->product = '所属' . $lang->productCommon;
|
||||
$lang->bug->branch = '分支/平台';
|
||||
$lang->bug->productplan = '所属计划';
|
||||
$lang->bug->module = '所属模块';
|
||||
$lang->bug->moduleAB = '模块';
|
||||
|
||||
@@ -29,7 +29,7 @@ $config->story->editor->activate = array('id' => 'comment', 'tools' => 'simpleTo
|
||||
|
||||
$config->story->list = new stdclass();
|
||||
$config->story->list->exportFields = '
|
||||
id, product, module, plan, source, title, spec, verify, keywords,
|
||||
id, product, branch, module, plan, source, title, spec, verify, keywords,
|
||||
pri, estimate, status, stage,
|
||||
openedBy, openedDate, assignedTo, assignedDate, mailto,
|
||||
reviewedBy, reviewedDate,
|
||||
|
||||
@@ -1331,11 +1331,13 @@ class story extends control
|
||||
$relatedModuleIdList = array();
|
||||
$relatedStoryIdList = array();
|
||||
$relatedPlanIdList = array();
|
||||
$relatedBranchIdList = array();
|
||||
|
||||
foreach($stories as $story)
|
||||
{
|
||||
$relatedModuleIdList[$story->module] = $story->module;
|
||||
$relatedPlanIdList[$story->plan] = $story->plan;
|
||||
$relatedBranchIdList[$story->branch] = $story->branch;
|
||||
|
||||
/* Process related stories. */
|
||||
$relatedStories = $story->childStories . ',' . $story->linkStories . ',' . $story->duplicateStory;
|
||||
@@ -1352,6 +1354,7 @@ class story extends control
|
||||
$relatedStories = $this->dao->select('id,title')->from(TABLE_STORY) ->where('id')->in($relatedStoryIdList)->fetchPairs();
|
||||
$relatedFiles = $this->dao->select('id, objectID, pathname, title')->from(TABLE_FILE)->where('objectType')->eq('story')->andWhere('objectID')->in(@array_keys($stories))->fetchGroup('objectID');
|
||||
$relatedSpecs = $this->dao->select('*')->from(TABLE_STORYSPEC)->where('`story`')->in(@array_keys($stories))->orderBy('version desc')->fetchGroup('story');
|
||||
$relatedBranch = $this->dao->select('id, name')->from(TABLE_BRANCH)->where('id')->in($relatedBranchIdList)->fetchPairs();
|
||||
|
||||
foreach($stories as $story)
|
||||
{
|
||||
@@ -1378,8 +1381,9 @@ class story extends control
|
||||
$story->verify = str_replace(' ', ' ', $story->verify);
|
||||
}
|
||||
/* fill some field with useful value. */
|
||||
if(isset($products[$story->product])) $story->product = $products[$story->product] . "(#$story->product)";
|
||||
if(isset($relatedModules[$story->module])) $story->module = $relatedModules[$story->module] . "(#$story->module)";
|
||||
if(isset($products[$story->product])) $story->product = $products[$story->product] . "(#$story->product)";
|
||||
if(isset($relatedModules[$story->module])) $story->module = $relatedModules[$story->module] . "(#$story->module)";
|
||||
if(isset($relatedBranch[$story->branch])) $story->branch = $relatedBranch[$story->branch] . "(#$story->branch)";
|
||||
if(isset($story->plan))
|
||||
{
|
||||
$plans = '';
|
||||
@@ -1408,7 +1412,6 @@ class story extends control
|
||||
$story->lastEditedDate = substr($story->lastEditedDate, 0, 10);
|
||||
$story->closedDate = substr($story->closedDate, 0, 10);
|
||||
|
||||
|
||||
if($story->linkStories)
|
||||
{
|
||||
$tmpLinkStories = array();
|
||||
|
||||
@@ -47,6 +47,7 @@ $lang->story->batchChangeModule = "批量修改模块";
|
||||
$lang->story->common = '需求';
|
||||
$lang->story->id = '编号';
|
||||
$lang->story->product = "所属{$lang->productCommon}";
|
||||
$lang->story->branch = "分支/平台";
|
||||
$lang->story->module = '所属模块';
|
||||
$lang->story->moduleAB = '模块';
|
||||
$lang->story->source = '需求来源';
|
||||
|
||||
Reference in New Issue
Block a user