Merge branch 'master' of github.com:easysoft/zentaopms
This commit is contained in:
@@ -30,7 +30,7 @@ $config->story->editor->activate = array('id' => 'comment', 'tools' => 'simpleTo
|
||||
$config->story->list = new stdclass();
|
||||
$config->story->list->exportFields = '
|
||||
id, product, branch, module, plan, source, title, spec, verify, keywords,
|
||||
pri, estimate, status, stage,
|
||||
pri, estimate, status, stage, taskCountAB, bugCountAB, caseCountAB,
|
||||
openedBy, openedDate, assignedTo, assignedDate, mailto,
|
||||
reviewedBy, reviewedDate,
|
||||
closedBy, closedDate, closedReason,
|
||||
|
||||
@@ -1359,6 +1359,7 @@ class story extends control
|
||||
$relatedStoryIdList = array();
|
||||
$relatedPlanIdList = array();
|
||||
$relatedBranchIdList = array();
|
||||
$relatedStoryIDs = array();
|
||||
|
||||
foreach($stories as $story)
|
||||
{
|
||||
@@ -1366,6 +1367,7 @@ class story extends control
|
||||
$relatedModuleIdList[$story->module] = $story->module;
|
||||
$relatedPlanIdList[$story->plan] = $story->plan;
|
||||
$relatedBranchIdList[$story->branch] = $story->branch;
|
||||
$relatedStoryIDs[$story->id] = $story->id;
|
||||
|
||||
/* Process related stories. */
|
||||
$relatedStories = $story->childStories . ',' . $story->linkStories . ',' . $story->duplicateStory;
|
||||
@@ -1376,6 +1378,10 @@ class story extends control
|
||||
}
|
||||
}
|
||||
|
||||
$storyTasks = $this->loadModel('task')->getStoryTaskCounts($relatedStoryIDs);
|
||||
$storyBugs = $this->loadModel('bug')->getStoryBugCounts($relatedStoryIDs);
|
||||
$storyCases = $this->loadModel('testcase')->getStoryCaseCounts($relatedStoryIDs);
|
||||
|
||||
/* Get related objects title or names. */
|
||||
$productsType = $this->dao->select('id, type')->from(TABLE_PRODUCT)->where('id')->in($relatedProductIdList)->fetchPairs();
|
||||
$relatedModules = $this->dao->select('id, name')->from(TABLE_MODULE)->where('id')->in($relatedModuleIdList)->fetchPairs();
|
||||
@@ -1436,6 +1442,10 @@ class story extends control
|
||||
if(isset($users[$story->lastEditedBy])) $story->lastEditedBy = $users[$story->lastEditedBy];
|
||||
if(isset($users[$story->closedBy])) $story->closedBy = $users[$story->closedBy];
|
||||
|
||||
if(isset($storyTasks[$story->id])) $story->taskCountAB = $storyTasks[$story->id];
|
||||
if(isset($storyBugs[$story->id])) $story->bugCountAB = $storyBugs[$story->id];
|
||||
if(isset($storyCases[$story->id])) $story->caseCountAB = $storyCases[$story->id];
|
||||
|
||||
$story->openedDate = substr($story->openedDate, 0, 10);
|
||||
$story->assignedDate = substr($story->assignedDate, 0, 10);
|
||||
$story->lastEditedDate = substr($story->lastEditedDate, 0, 10);
|
||||
|
||||
@@ -20,8 +20,8 @@ $config->testcase->export->listFields = array('type', 'stage', 'pri', 'status'
|
||||
$config->testcase->exportFields = '
|
||||
id, product, branch, module, story,
|
||||
title, precondition, stepDesc, stepExpect, keywords,
|
||||
pri, type, stage, status, lastRunResult, openedBy, openedDate,
|
||||
lastEditedBy, lastEditedDate, version,linkCase';
|
||||
pri, type, stage, status, bugsAB, resultsAB, stepNumberAB, lastRunResult, openedBy, openedDate,
|
||||
lastEditedBy, lastEditedDate, version, linkCase';
|
||||
|
||||
$config->testcase->customCreateFields = 'story,stage,pri,keywords';
|
||||
$config->testcase->customBatchCreateFields = 'module,stage,story,pri,precondition,keywords';
|
||||
|
||||
@@ -1095,6 +1095,7 @@ class testcase extends control
|
||||
$relatedSteps = $this->dao->select('parent,`case`,version,type,`desc`,expect')->from(TABLE_CASESTEP)->where('`case`')->in(@array_keys($cases))->orderBy('version desc,id')->fetchGroup('case');
|
||||
$relatedModules = array('0' => '/') + $relatedModules;
|
||||
|
||||
$cases = $this->testcase->appendData($cases);
|
||||
foreach($cases as $case)
|
||||
{
|
||||
$case->stepDesc = '';
|
||||
@@ -1142,6 +1143,11 @@ class testcase extends control
|
||||
if(isset($users[$case->lastEditedBy])) $case->lastEditedBy = $users[$case->lastEditedBy];
|
||||
if(isset($caseLang->resultList[$case->lastRunResult])) $case->lastRunResult = $caseLang->resultList[$case->lastRunResult];
|
||||
|
||||
$case->bugsAB = $case->bugs; unset($case->bugs);
|
||||
$case->resultsAB = $case->results; unset($case->results);
|
||||
$case->stepNumberAB = $case->stepNumber; unset($case->stepNumber);
|
||||
unset($case->caseFails);
|
||||
|
||||
$case->stage = explode(',', $case->stage);
|
||||
foreach($case->stage as $key => $stage) $case->stage[$key] = isset($caseLang->stageList[$stage]) ? $caseLang->stageList[$stage] : $stage;
|
||||
$case->stage = join("\n", $case->stage);
|
||||
|
||||
Reference in New Issue
Block a user