* Solve the problem of mutual testing for task #45085.
This commit is contained in:
@@ -238,7 +238,6 @@ class product extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
$branchID = $browseType == 'bymodule' ? 'all' : $branchID;
|
||||
$branches = $this->loadModel('branch')->getPairs($productID);
|
||||
$stories = $this->product->getStories($productID, $branchID, $browseType, $queryID, $moduleID, $storyType, $sort, $pager);
|
||||
}
|
||||
|
||||
@@ -2608,9 +2608,9 @@ class storyModel extends model
|
||||
else
|
||||
{
|
||||
$productParam = ($type == 'byproduct' and $param) ? $param : $this->cookie->storyProductParam;
|
||||
$branchParam = ($type == 'bybranch' and $param !== '') ? $param : $this->cookie->storyBranchParam;
|
||||
$moduleParam = ($type == 'bymodule' and $param) ? $param : $this->cookie->storyModuleParam;
|
||||
$modules = (empty($moduleParam) or strpos(',all,unclosed,bymodule,', ",$type,") === false) ? array() : $this->dao->select('id')->from(TABLE_MODULE)->where('path')->like("%,$moduleParam,%")->andWhere('type')->eq('story')->andWhere('deleted')->eq(0)->fetchPairs();
|
||||
$branchParam = ($type == 'bybranch' and $param !== '') ? $param : $this->cookie->storyBranchParam;
|
||||
$moduleParam = ($type == 'bymodule' and $param !== '') ? $param : $this->cookie->storyModuleParam;
|
||||
$modules = (empty($moduleParam) or strpos('allstory,unclosed,bymodule', "$type") === false) ? array() : $this->dao->select('id')->from(TABLE_MODULE)->where('path')->like("%,$moduleParam,%")->andWhere('type')->eq('story')->andWhere('deleted')->eq(0)->fetchPairs();
|
||||
if(strpos($branchParam, ',') !== false) list($productParam, $branchParam) = explode(',', $branchParam);
|
||||
|
||||
$unclosedStatus = $this->lang->story->statusList;
|
||||
|
||||
@@ -814,7 +814,7 @@ class treeModel extends model
|
||||
foreach($products as $id => $product)
|
||||
{
|
||||
$extra['productID'] = $id;
|
||||
$projectProductLink = helper::createLink('projectstory', 'story', "projectID=$rootID&productID=$id");
|
||||
$projectProductLink = helper::createLink('projectstory', 'story', "projectID=$rootID&productID=$id&branch=all");
|
||||
$executionProductLink = helper::createLink('execution', 'story', "executionID=$rootID&ordery=&status=byProduct&praram=$id");
|
||||
$link = $this->app->rawModule == 'projectstory' ? $projectProductLink : $executionProductLink;
|
||||
if($productNum > 1) $menu .= "<li>" . html::a($link, $product, '_self', "id='product$id'");
|
||||
@@ -1183,16 +1183,18 @@ class treeModel extends model
|
||||
/**
|
||||
* Create link of a test case.
|
||||
*
|
||||
* @param object $module
|
||||
* @param string $type
|
||||
* @param object $module
|
||||
* @param array $extra
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function createCaseLink($type, $module)
|
||||
public function createCaseLink($type, $module, $extra = array())
|
||||
{
|
||||
$moduleName = $this->app->tab == 'project' ? 'project' : 'testcase';
|
||||
$methodName = $this->app->tab == 'project' ? 'testcase' : 'browse';
|
||||
$projectParam = $this->app->tab == 'project' ? "projectID={$this->session->project}&" : '';
|
||||
return html::a(helper::createLink($moduleName, $methodName, $projectParam . "root={$module->root}&branch={$module->branch}&type=byModule¶m={$module->id}"), $module->name, '_self', "id='module{$module->id}' data-app='{$this->app->tab}' title='{$module->name}'");
|
||||
return html::a(helper::createLink($moduleName, $methodName, $projectParam . "root={$module->root}&branch={$extra['branchID']}&type=byModule¶m={$module->id}"), $module->name, '_self', "id='module{$module->id}' data-app='{$this->app->tab}' title='{$module->name}'");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user