* finish task #5241.
This commit is contained in:
@@ -550,6 +550,7 @@ class bug extends control
|
||||
/* Get product info. */
|
||||
$productID = $bug->product;
|
||||
$productName = $this->products[$productID];
|
||||
$branches = $this->session->currentProductType == 'normal' ? array() : $this->loadModel('branch')->getPairs($bug->product);
|
||||
|
||||
/* Header and positon. */
|
||||
$this->view->title = "BUG #$bug->id $bug->title - " . $this->products[$productID];
|
||||
@@ -559,9 +560,11 @@ class bug extends control
|
||||
/* Assign. */
|
||||
$this->view->productID = $productID;
|
||||
$this->view->productName = $productName;
|
||||
$this->view->branches = $branches;
|
||||
$this->view->modulePath = $this->tree->getParents($bug->module);
|
||||
$this->view->bugModule = empty($bug->module) ? '' : $this->tree->getById($bug->module);
|
||||
$this->view->bug = $bug;
|
||||
$this->view->branchName = $this->session->currentProductType == 'normal' ? '' : $this->loadModel('branch')->getById($bug->branch, $bug->product);
|
||||
$this->view->branchName = $this->session->currentProductType == 'normal' ? '' : zget($branches, $bug->branch, '');
|
||||
$this->view->users = $this->user->getPairs('noletter');
|
||||
$this->view->actions = $this->action->getList('bug', $bugID);
|
||||
$this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID, $branch = 0, $params = '');
|
||||
|
||||
@@ -123,16 +123,22 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach($modulePath as $key => $module)
|
||||
{
|
||||
$moduleTitle .= $module->name;
|
||||
if(!common::printLink('bug', 'browse', "productID=$bug->product&branch=$module->branch&browseType=byModule¶m=$module->id", $module->name)) echo $module->name;
|
||||
if(isset($modulePath[$key + 1]))
|
||||
{
|
||||
$moduleTitle .= '/';
|
||||
echo $lang->arrow;
|
||||
}
|
||||
}
|
||||
if($bugModule->branch and isset($branches[$bugModule->branch]))
|
||||
{
|
||||
$moduleTitle .= $branches[$bugModule->branch] . '/';
|
||||
echo $branches[$bugModule->branch] . $lang->arrow;
|
||||
}
|
||||
|
||||
foreach($modulePath as $key => $module)
|
||||
{
|
||||
$moduleTitle .= $module->name;
|
||||
if(!common::printLink('bug', 'browse', "productID=$bug->product&branch=$module->branch&browseType=byModule¶m=$module->id", $module->name)) echo $module->name;
|
||||
if(isset($modulePath[$key + 1]))
|
||||
{
|
||||
$moduleTitle .= '/';
|
||||
echo $lang->arrow;
|
||||
}
|
||||
}
|
||||
}
|
||||
$printModule = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
+19
-17
@@ -683,6 +683,7 @@ class story extends control
|
||||
$fromBug = $this->dao->select('id,title')->from(TABLE_BUG)->where('toStory')->eq($storyID)->fetch();
|
||||
$cases = $this->dao->select('id,title')->from(TABLE_CASE)->where('story')->eq($storyID)->andWhere('deleted')->eq(0)->fetchAll();
|
||||
$modulePath = $this->tree->getParents($story->module);
|
||||
$storyModule = empty($story->module) ? '' : $this->tree->getById($story->module);
|
||||
$users = $this->user->getPairs('noletter');
|
||||
|
||||
/* Set the menu. */
|
||||
@@ -699,23 +700,24 @@ class story extends control
|
||||
$position[] = $this->lang->story->common;
|
||||
$position[] = $this->lang->story->view;
|
||||
|
||||
$this->view->title = $title;
|
||||
$this->view->position = $position;
|
||||
$this->view->product = $product;
|
||||
$this->view->branches = $product->type == 'normal' ? array() : $this->loadModel('branch')->getPairs($product->id);
|
||||
$this->view->plan = $plan;
|
||||
$this->view->bugs = $bugs;
|
||||
$this->view->fromBug = $fromBug;
|
||||
$this->view->cases = $cases;
|
||||
$this->view->story = $story;
|
||||
$this->view->users = $users;
|
||||
$this->view->projects = $this->loadModel('project')->getPairs('nocode');
|
||||
$this->view->actions = $this->action->getList('story', $storyID);
|
||||
$this->view->modulePath = $modulePath;
|
||||
$this->view->version = $version == 0 ? $story->version : $version;
|
||||
$this->view->preAndNext = $this->loadModel('common')->getPreAndNextObject('story', $storyID);
|
||||
$this->view->from = $from;
|
||||
$this->view->param = $param;
|
||||
$this->view->title = $title;
|
||||
$this->view->position = $position;
|
||||
$this->view->product = $product;
|
||||
$this->view->branches = $product->type == 'normal' ? array() : $this->loadModel('branch')->getPairs($product->id);
|
||||
$this->view->plan = $plan;
|
||||
$this->view->bugs = $bugs;
|
||||
$this->view->fromBug = $fromBug;
|
||||
$this->view->cases = $cases;
|
||||
$this->view->story = $story;
|
||||
$this->view->users = $users;
|
||||
$this->view->projects = $this->loadModel('project')->getPairs('nocode');
|
||||
$this->view->actions = $this->action->getList('story', $storyID);
|
||||
$this->view->storyModule = $storyModule;
|
||||
$this->view->modulePath = $modulePath;
|
||||
$this->view->version = $version == 0 ? $story->version : $version;
|
||||
$this->view->preAndNext = $this->loadModel('common')->getPreAndNextObject('story', $storyID);
|
||||
$this->view->from = $from;
|
||||
$this->view->param = $param;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -144,6 +144,12 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
if($storyModule->branch and isset($branches[$storyModule->branch]))
|
||||
{
|
||||
$moduleTitle .= $branches[$storyModule->branch] . '/';
|
||||
echo $branches[$storyModule->branch] . $lang->arrow;
|
||||
}
|
||||
|
||||
foreach($modulePath as $key => $module)
|
||||
{
|
||||
$moduleTitle .= $module->name;
|
||||
|
||||
@@ -487,6 +487,7 @@ class testcase extends control
|
||||
if(!$case) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
if($from == 'testtask') $run = $this->loadModel('testtask')->getRunByCase($taskID, $caseID);
|
||||
|
||||
$branches = $this->session->currentProductType == 'normal' ? array() : $this->loadModel('branch')->getPairs($case->product);
|
||||
$isLibCase = ($case->lib and empty($case->product));
|
||||
if($isLibCase)
|
||||
{
|
||||
@@ -508,7 +509,7 @@ class testcase extends control
|
||||
$this->view->position[] = html::a($this->createLink('testcase', 'browse', "productID=$productID"), $this->products[$productID]);
|
||||
|
||||
$this->view->productName = $this->products[$productID];
|
||||
$this->view->branchName = $this->session->currentProductType == 'normal' ? '' : $this->loadModel('branch')->getById($case->branch);
|
||||
$this->view->branchName = $this->session->currentProductType == 'normal' ? '' : zget($branches, $case->branch, '');
|
||||
}
|
||||
|
||||
$caseFails = $this->dao->select('COUNT(*) AS count')->from(TABLE_TESTRESULT)
|
||||
@@ -526,12 +527,14 @@ class testcase extends control
|
||||
$this->view->taskID = $taskID;
|
||||
$this->view->version = $version ? $version : $case->version;
|
||||
$this->view->modulePath = $this->tree->getParents($case->module);
|
||||
$this->view->caseModule = empty($case->module) ? '' : $this->tree->getById($case->module);
|
||||
$this->view->users = $this->user->getPairs('noletter');
|
||||
$this->view->actions = $this->loadModel('action')->getList('case', $caseID);
|
||||
$this->view->preAndNext = $this->loadModel('common')->getPreAndNextObject('testcase', $caseID);
|
||||
$this->view->runID = $from == 'testcase' ? 0 : $run->id;
|
||||
$this->view->isLibCase = $isLibCase;
|
||||
$this->view->caseFails = $caseFails;
|
||||
$this->view->branches = $branches;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -156,11 +156,16 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach($modulePath as $key => $module)
|
||||
{
|
||||
if(!common::printLink('testcase', 'browse', "productID=$case->product&branch=$module->branch&browseType=byModule¶m=$module->id", $module->name)) echo $module->name;
|
||||
if(isset($modulePath[$key + 1])) echo $lang->arrow;
|
||||
}
|
||||
if($caseModule->branch and isset($branches[$caseModule->branch]))
|
||||
{
|
||||
echo $branches[$caseModule->branch] . $lang->arrow;
|
||||
}
|
||||
|
||||
foreach($modulePath as $key => $module)
|
||||
{
|
||||
if(!common::printLink('testcase', 'browse', "productID=$case->product&branch=$module->branch&browseType=byModule¶m=$module->id", $module->name)) echo $module->name;
|
||||
if(isset($modulePath[$key + 1])) echo $lang->arrow;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user