* Fix bug #7914.
This commit is contained in:
@@ -21,7 +21,7 @@ $config->testcase->exportFields = '
|
||||
id, product, branch, module, story,
|
||||
title, precondition, stepDesc, stepExpect, real, keywords,
|
||||
pri, type, stage, status, bugsAB, resultsAB, stepNumberAB, lastRunResult, openedBy, openedDate,
|
||||
lastEditedBy, lastEditedDate, version, linkCase';
|
||||
lastEditedBy, lastEditedDate, version, linkCase, files';
|
||||
|
||||
$config->testcase->customCreateFields = 'story,stage,pri,keywords';
|
||||
$config->testcase->customBatchCreateFields = 'module,stage,story,pri,precondition,keywords,review';
|
||||
|
||||
@@ -1111,6 +1111,7 @@ class testcase extends control
|
||||
if($product->type != 'normal') $this->lang->testcase->branch = $this->lang->product->branchName[$product->type];
|
||||
if($_POST)
|
||||
{
|
||||
$this->loadModel('file');
|
||||
$this->app->loadLang('testtask');
|
||||
$caseLang = $this->lang->testcase;
|
||||
$caseConfig = $this->config->testcase;
|
||||
@@ -1198,6 +1199,7 @@ class testcase extends control
|
||||
$relatedStories = $this->dao->select('id,title')->from(TABLE_STORY) ->where('id')->in($relatedStoryIdList)->fetchPairs();
|
||||
$relatedCases = $this->dao->select('id, title')->from(TABLE_CASE)->where('id')->in($relatedCaseIdList)->fetchPairs();
|
||||
$relatedSteps = $this->dao->select('id,parent,`case`,version,type,`desc`,expect')->from(TABLE_CASESTEP)->where('`case`')->in(@array_keys($cases))->orderBy('version desc,id')->fetchGroup('case', 'id');
|
||||
$relatedFiles = $this->dao->select('id, objectID, pathname, title')->from(TABLE_FILE)->where('objectType')->eq('testcase')->andWhere('objectID')->in(@array_keys($cases))->andWhere('extra')->ne('editor')->fetchGroup('objectID');
|
||||
|
||||
$cases = $this->testcase->appendData($cases);
|
||||
foreach($cases as $case)
|
||||
@@ -1284,6 +1286,16 @@ class testcase extends control
|
||||
}
|
||||
$case->linkCase = join("; \n", $tmpLinkCases);
|
||||
}
|
||||
|
||||
/* Set related files. */
|
||||
$case->files = '';
|
||||
if(isset($relatedFiles[$case->id]))
|
||||
{
|
||||
foreach($relatedFiles[$case->id] as $file)
|
||||
{
|
||||
$case->files .= $file->title . '<br />';
|
||||
}
|
||||
}
|
||||
}
|
||||
if(isset($this->config->bizVersion)) list($fields, $cases) = $this->loadModel('workflowfield')->appendDataFromFlow($fields, $cases);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user