+15
-2
@@ -240,6 +240,18 @@ class bug extends control
|
||||
if($runID > 0) $resultID = $this->dao->select('id')->from(TABLE_TESTRESULT)->where('run')->eq($runID)->orderBy('id desc')->limit(1)->fetch('id');
|
||||
if(isset($resultID) and $resultID > 0) extract($this->bug->getBugInfoFromResult($resultID));
|
||||
|
||||
/* 如果指定了项目,则查找项目范围内的build和story。*/
|
||||
if($projectID)
|
||||
{
|
||||
$builds = $this->loadModel('build')->getProjectBuildPairs($projectID, 'noempty');
|
||||
$stories = $this->story->getProjectStoryPairs($projectID);
|
||||
}
|
||||
else
|
||||
{
|
||||
$builds = $this->loadModel('build')->getProductBuildPairs($productID, 'noempty');
|
||||
$stories = $this->story->getProductStoryPairs($productID);
|
||||
}
|
||||
|
||||
/* 位置信息。*/
|
||||
$this->view->header->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->create;
|
||||
$this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]);
|
||||
@@ -248,10 +260,11 @@ class bug extends control
|
||||
$this->view->productID = $productID;
|
||||
$this->view->productName = $this->products[$productID];
|
||||
$this->view->moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'bug', $rooteModuleID = 0);
|
||||
$this->view->stories = $this->story->getProductStoryPairs($productID);
|
||||
$this->view->stories = $stories;
|
||||
$this->view->users = $this->user->getPairs('noclosed');
|
||||
$this->view->projects = $this->product->getProjectPairs($productID);
|
||||
$this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID, 'noempty');
|
||||
$this->view->builds = $builds;
|
||||
$this->view->tasks = $this->loadModel('task')->getProjectTaskPairs($projectID);
|
||||
$this->view->moduleID = $moduleID;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->taskID = $taskID;
|
||||
|
||||
@@ -25,14 +25,16 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/autocomplete.html.php';?>
|
||||
<style>
|
||||
#project, #product, #story{width:245px}
|
||||
#severity, #browser {width: 113px}
|
||||
#project, #product {width:200px}
|
||||
#module, #task {width:400px}
|
||||
#severity, #browser {width:113px}
|
||||
#story{width:605px}
|
||||
</style>
|
||||
<script language='Javascript'>
|
||||
/* 当选择产品时,触发这个方法。*/
|
||||
function loadAll(productID)
|
||||
{
|
||||
$('#taskIdBox').get(0).innerHTML = ''; // 将taskID内容复位。
|
||||
$('#taskIdBox').get(0).innerHTML = '<select id="task"></select>'; // 将taskID内容复位。
|
||||
loadModuleMenu(productID); // 加载产品的模块列表。
|
||||
loadProductStories(productID); // 加载产品的需求列表。
|
||||
loadProductProjects(productID); // 加载项目列表。
|
||||
@@ -80,6 +82,7 @@ function loadProjectRelated(projectID)
|
||||
{
|
||||
$('#taskIdBox').get(0).innerHTML = '';
|
||||
loadProductStories($('#product').get(0).value);
|
||||
loadProductBuilds($('#product').get(0).value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,8 +127,8 @@ $(function() {
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->bug->lblProjectAndTask;?></th>
|
||||
<td>
|
||||
<span id='projectIdBox'><?php echo html::select('project', $projects, $projectID, 'onchange=loadProjectRelated(this.value)');?></span>
|
||||
<span id='taskIdBox'></span>
|
||||
<span id='projectIdBox'><?php echo html::select('project', $projects, $projectID, 'onchange=loadProjectRelated(this.value)');?></span>
|
||||
<span id='taskIdBox'><?php echo html::select('task', $tasks, $taskID);?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user