* Fix linkstory bug.
This commit is contained in:
@@ -155,7 +155,7 @@ $lang->project->dividerMenu = ',execution,programplan,doc,dynamic,';
|
||||
$lang->scrum->menu = new stdclass();
|
||||
$lang->scrum->menu->index = array('link' => "{$lang->dashboard}|project|index|project=%s");
|
||||
$lang->scrum->menu->execution = array('link' => "$lang->executionCommon|project|execution|projectID=%s");
|
||||
$lang->scrum->menu->story = array('link' => "$lang->SRCommon|projectstory|story|projectID=%s", 'alias' => 'story,track');
|
||||
$lang->scrum->menu->story = array('link' => "$lang->SRCommon|projectstory|story|projectID=%s", 'subModule' => 'projectstory', 'alias' => 'story,track');
|
||||
$lang->scrum->menu->doc = array('link' => "{$lang->doc->common}|doc|objectLibs|type=project&objectID=%s", 'subModule' => 'doc');
|
||||
$lang->scrum->menu->qa = array('link' => "{$lang->qa->common}|project|qa|projectID=%s", 'subModule' => 'testcase,testtask,bug', 'alias' => 'bug,testtask,testcase');
|
||||
$lang->scrum->menu->devops = array('link' => "{$lang->devops->common}|repo|browse|repoID=0&objectID=%s", 'subModule' => 'repo');
|
||||
@@ -198,7 +198,7 @@ $lang->waterfall->menu->programplan = array('link' => "{$lang->productplan->shor
|
||||
$lang->waterfall->menu->execution = array('link' => "$lang->executionCommon|execution|all|status=all&projectID=%s", 'subModule' => ',project,task,');
|
||||
$lang->waterfall->menu->doc = array('link' => "{$lang->doc->common}|doc|index|project=%s");
|
||||
$lang->waterfall->menu->weekly = array('link' => "{$lang->project->report}|weekly|index|project=%s", 'subModule' => ',milestone,');
|
||||
$lang->waterfall->menu->story = array('link' => "$lang->SRCommon|projectstory|story|project=%s");
|
||||
$lang->waterfall->menu->story = array('link' => "$lang->SRCommon|projectstory|story|project=%s", 'subModule' => 'projectstory');
|
||||
$lang->waterfall->menu->design = array('link' => "$lang->design|design|browse|product=0&project=%s");
|
||||
$lang->waterfall->menu->repo = array('link' => "{$lang->devops->common}|repo|browse|repoID=0&objectID=%s", 'subModule' => 'repo');
|
||||
$lang->waterfall->menu->track = array('link' => "$lang->track|projectstory|track", 'alias' => 'track');
|
||||
|
||||
@@ -2222,7 +2222,7 @@ class execution extends control
|
||||
/**
|
||||
* Link stories to an execution.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @param int $objectID
|
||||
* @param string $browseType
|
||||
* @param int $param
|
||||
* @param int $recTotal
|
||||
@@ -2231,33 +2231,41 @@ class execution extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function linkStory($executionID = 0, $browseType = '', $param = 0, $recTotal = 0, $recPerPage = 50, $pageID = 1)
|
||||
public function linkStory($objectID = 0, $browseType = '', $param = 0, $recTotal = 0, $recPerPage = 50, $pageID = 1)
|
||||
{
|
||||
$this->loadModel('story');
|
||||
$this->loadModel('product');
|
||||
|
||||
/* Get executions and products. */
|
||||
$execution = $this->execution->getById($executionID);
|
||||
$products = $this->execution->getProducts($executionID);
|
||||
$browseLink = $this->createLink('execution', 'story', "executionID=$executionID");
|
||||
if($execution->type == 'project') $browseLink = $this->createLink('projectstory', 'story', "projectID=$executionID");
|
||||
/* Get projects, executions and products. */
|
||||
$object = $this->project->getByID($objectID, $this->app->openApp == 'project' ? 'project' : 'sprint,stage');
|
||||
$products = $this->project->getProducts($objectID);
|
||||
$browseLink = $this->createLink($this->app->openApp == 'project' ? 'projectstory' : 'execution', 'story', "objectID=$objectID");
|
||||
|
||||
$this->session->set('storyList', $this->app->getURI(true), 'product'); // Save session.
|
||||
if($execution->type != 'execution') $this->execution->setMenu($execution->id); // Set menu.
|
||||
|
||||
/* Only execution can have no products. */
|
||||
if(empty($products))
|
||||
{
|
||||
echo js::alert($this->lang->execution->errorNoLinkedProducts);
|
||||
die(js::locate($this->createLink('execution', 'manageproducts', "executionID=$executionID")));
|
||||
die(js::locate($this->createLink('execution', 'manageproducts', "executionID=$objectID")));
|
||||
}
|
||||
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->execution->linkStory($executionID);
|
||||
if($execution->project != 0) $this->execution->linkStory($execution->project);
|
||||
$this->execution->linkStory($objectID);
|
||||
if($object->type != 'project' and $object->project != 0) $this->execution->linkStory($object->project);
|
||||
die(js::locate($browseLink));
|
||||
}
|
||||
|
||||
if($object->type == 'project')
|
||||
{
|
||||
$this->project->setMenu($object->id);
|
||||
}
|
||||
else if($object->type == 'sprint' or $object->type == 'stage')
|
||||
{
|
||||
$this->execution->setMenu($object->id);
|
||||
}
|
||||
|
||||
$queryID = ($browseType == 'bySearch') ? (int)$param : 0;
|
||||
|
||||
/* Set modules and branches. */
|
||||
@@ -2282,28 +2290,24 @@ class execution extends control
|
||||
}
|
||||
|
||||
/* Build the search form. */
|
||||
$actionURL = $this->createLink($this->app->rawModule, 'linkStory', "executionID=$executionID&browseType=bySearch&queryID=myQueryID");
|
||||
$actionURL = $this->createLink($this->app->rawModule, 'linkStory', "objectID=$objectID&browseType=bySearch&queryID=myQueryID");
|
||||
$branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), 'noempty');
|
||||
$this->execution->buildStorySearchForm($products, $branchGroups, $modules, $queryID, $actionURL, 'linkStory');
|
||||
|
||||
if($browseType == 'bySearch')
|
||||
{
|
||||
$allStories = $this->story->getBySearch('', 0, $queryID, 'id', $executionID);
|
||||
$allStories = $this->story->getBySearch('', 0, $queryID, 'id', $objectID);
|
||||
}
|
||||
else
|
||||
{
|
||||
$allStories = $this->story->getProductStories(array_keys($products), $branches, $moduleID = '0', $status = 'active', 'story', 'id_desc', $hasParent = false, '', $pager = null);
|
||||
}
|
||||
|
||||
if($execution->project != 0) $projectStories = $this->story->getExecutionStoryPairs($execution->project);
|
||||
|
||||
$executionStories = $this->story->getExecutionStoryPairs($executionID);
|
||||
$linkedStories = $this->story->getExecutionStoryPairs($objectID);
|
||||
foreach($allStories as $id => $story)
|
||||
{
|
||||
if(isset($executionStories[$story->id])) unset($allStories[$id]);
|
||||
|
||||
if(isset($linkedStories[$story->id])) unset($allStories[$id]);
|
||||
if($story->parent < 0) unset($allStories[$id]);
|
||||
if(!empty($projectStories) and !isset($projectStories[$story->id])) unset($allStories[$id]);
|
||||
}
|
||||
|
||||
/* Pager. */
|
||||
@@ -2313,13 +2317,12 @@ class execution extends control
|
||||
$allStories = array_chunk($allStories, $pager->recPerPage);
|
||||
|
||||
/* Assign. */
|
||||
$this->view->title = $execution->name . $this->lang->colon . $this->lang->execution->linkStory;
|
||||
$this->view->position[] = html::a($browseLink, $execution->name);
|
||||
$this->view->title = $object->name . $this->lang->colon . $this->lang->execution->linkStory;
|
||||
$this->view->position[] = html::a($browseLink, $object->name);
|
||||
$this->view->position[] = $this->lang->execution->linkStory;
|
||||
|
||||
$this->view->execution = $execution;
|
||||
$this->view->object = $object;
|
||||
$this->view->products = $products;
|
||||
$this->view->executionStories = empty($executionStories) ? '' : $executionStories;
|
||||
$this->view->allStories = empty($allStories) ? $allStories : $allStories[$pageID - 1];;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->browseType = $browseType;
|
||||
|
||||
@@ -251,12 +251,12 @@ $lang->execution->byQuery = 'Search';
|
||||
|
||||
/* Query condition list. */
|
||||
$lang->execution->allExecution = "All {$lang->executionCommon}s";
|
||||
$lang->execution->aboveAllProduct = "All the above {$lang->productCommon}s";
|
||||
$lang->execution->aboveAllProduct = "All the above {$lang->productCommon}s";
|
||||
$lang->execution->aboveAllExecution = "All the above {$lang->executionCommon}s";
|
||||
|
||||
/* Page prompt. */
|
||||
$lang->execution->linkStoryByPlanTips = "This action will link all stories in this plan to the {$lang->executionCommon}.";
|
||||
$lang->execution->selectExecution = "Select {$lang->executionCommon}";
|
||||
$lang->execution->selectExecution = "Select {$lang->executionCommon}";
|
||||
$lang->execution->selectExecution = "Select Stage/Sprint/Iteration";
|
||||
$lang->execution->beginAndEnd = 'Duration';
|
||||
$lang->execution->lblStats = 'Efforts';
|
||||
@@ -275,7 +275,7 @@ $lang->execution->howToUpdateBurn = "<a href='https://api.zentao.pm/goto.php
|
||||
$lang->execution->whyNoStories = "No story can be linked. Please check whether there is any story in {$lang->executionCommon} which is linked to {$lang->productCommon} and make sure it has been reviewed.";
|
||||
$lang->execution->productStories = "Stories linked to {$lang->executionCommon} are the subeset of stories linked to {$lang->productCommon}. Stories can only be linked after they pass the review. <a href='%s'> Link Stories</a> now.";
|
||||
$lang->execution->haveDraft = "%s stories in draft, so they can't be linked.";
|
||||
$lang->execution->doneExecutions = 'Finished';
|
||||
$lang->execution->doneExecutions = 'Finished';
|
||||
$lang->execution->selectDept = 'Select Department';
|
||||
$lang->execution->selectDeptTitle = 'Select User';
|
||||
$lang->execution->copyTeam = 'Copy Team';
|
||||
@@ -283,15 +283,15 @@ $lang->execution->copyFromTeam = "Copy from {$lang->executionCommon} Team
|
||||
$lang->execution->noMatched = "No $lang->executionCommon including '%s'can be found.";
|
||||
$lang->execution->copyTitle = "Choose a {$lang->executionCommon} to copy.";
|
||||
$lang->execution->copyTeamTitle = "Choose a {$lang->executionCommon} Team to copy.";
|
||||
$lang->execution->copyNoExecution = "No {$lang->executionCommon} can be copied.";
|
||||
$lang->execution->copyFromExecution = "Copy from {$lang->executionCommon} <strong>%s</strong>";
|
||||
$lang->execution->copyNoExecution = "No {$lang->executionCommon} can be copied.";
|
||||
$lang->execution->copyFromExecution = "Copy from {$lang->executionCommon} <strong>%s</strong>";
|
||||
$lang->execution->cancelCopy = 'Cancel Copy';
|
||||
$lang->execution->byPeriod = 'By Time';
|
||||
$lang->execution->byUser = 'By User';
|
||||
$lang->execution->noExecution = "No {$lang->executionCommon}. ";
|
||||
$lang->execution->noExecution = "No {$lang->executionCommon}. ";
|
||||
$lang->execution->noMembers = 'No team members yet. ';
|
||||
$lang->execution->workloadTotal = "The cumulative workload ratio should not exceed 100, and the total workload under the current product is: %s";
|
||||
$lang->execution->linkPRJStoryTip = "(Link {$lang->SRCommon} comes from {$lang->SRCommon} linked under the execution)";
|
||||
// $lang->execution->linkProjectStoryTip = "(Link {$lang->SRCommon} comes from {$lang->SRCommon} linked under the execution)";
|
||||
$lang->execution->linkAllStoryTip = "({$lang->SRCommon} has never been linked under the execution, and can be directly linked with {$lang->SRCommon} of the product linked with the sprint/stage)";
|
||||
|
||||
/* Interactive prompts. */
|
||||
|
||||
@@ -251,12 +251,12 @@ $lang->execution->byQuery = '搜索';
|
||||
|
||||
/* 查询条件列表。*/
|
||||
$lang->execution->allExecution = "所有{$lang->executionCommon}";
|
||||
$lang->execution->aboveAllProduct = "以上所有{$lang->productCommon}";
|
||||
$lang->execution->aboveAllProduct = "以上所有{$lang->productCommon}";
|
||||
$lang->execution->aboveAllExecution = "以上所有{$lang->executionCommon}";
|
||||
|
||||
/* 页面提示。*/
|
||||
$lang->execution->linkStoryByPlanTips = "此操作会将所选计划下面的{$lang->SRCommon}全部关联到此{$lang->executionCommon}中";
|
||||
$lang->execution->selectExecution = "请选择{$lang->executionCommon}";
|
||||
$lang->execution->selectExecution = "请选择{$lang->executionCommon}";
|
||||
$lang->execution->selectExecution = "请选择阶段/迭代/冲刺";
|
||||
$lang->execution->beginAndEnd = '起止时间';
|
||||
$lang->execution->lblStats = '工时统计';
|
||||
@@ -275,7 +275,7 @@ $lang->execution->howToUpdateBurn = "<a href='https://api.zentao.net/goto.ph
|
||||
$lang->execution->whyNoStories = "看起来没有{$lang->SRCommon}可以关联。请检查下{$lang->executionCommon}关联的{$lang->productCommon}中有没有{$lang->SRCommon},而且要确保它们已经审核通过。";
|
||||
$lang->execution->productStories = "{$lang->executionCommon}关联的{$lang->SRCommon}是{$lang->productCommon}{$lang->SRCommon}的子集,并且只有评审通过的{$lang->SRCommon}才能关联。请<a href='%s'>关联{$lang->SRCommon}</a>。";
|
||||
$lang->execution->haveDraft = "有%s条草稿状态的{$lang->SRCommon}无法关联到该{$lang->executionCommon}";
|
||||
$lang->execution->doneExecutions = '已结束';
|
||||
$lang->execution->doneExecutions = '已结束';
|
||||
$lang->execution->selectDept = '选择部门';
|
||||
$lang->execution->selectDeptTitle = '选择一个部门的成员';
|
||||
$lang->execution->copyTeam = '复制团队';
|
||||
@@ -283,15 +283,15 @@ $lang->execution->copyFromTeam = "复制自{$lang->executionCommon}团队
|
||||
$lang->execution->noMatched = "找不到包含'%s'的$lang->executionCommon";
|
||||
$lang->execution->copyTitle = "请选择一个{$lang->executionCommon}来复制";
|
||||
$lang->execution->copyTeamTitle = "选择一个{$lang->executionCommon}团队来复制";
|
||||
$lang->execution->copyNoExecution = "没有可用的{$lang->executionCommon}来复制";
|
||||
$lang->execution->copyFromExecution = "复制自{$lang->executionCommon} <strong>%s</strong>";
|
||||
$lang->execution->copyNoExecution = "没有可用的{$lang->executionCommon}来复制";
|
||||
$lang->execution->copyFromExecution = "复制自{$lang->executionCommon} <strong>%s</strong>";
|
||||
$lang->execution->cancelCopy = '取消复制';
|
||||
$lang->execution->byPeriod = '按时间段';
|
||||
$lang->execution->byUser = '按用户';
|
||||
$lang->execution->noExecution = "暂时没有{$lang->executionCommon}。";
|
||||
$lang->execution->noExecution = "暂时没有{$lang->executionCommon}。";
|
||||
$lang->execution->noMembers = '暂时没有团队成员。';
|
||||
$lang->execution->workloadTotal = "工作量占比累计不应当超过100, 当前产品下的工作量之和为%s";
|
||||
$lang->execution->linkPRJStoryTip = "(关联{$lang->SRCommon}来源于项目下所关联的{$lang->SRCommon})";
|
||||
// $lang->execution->linkProjectStoryTip = "(关联{$lang->SRCommon}来源于项目下所关联的{$lang->SRCommon})";
|
||||
$lang->execution->linkAllStoryTip = "(项目下还未关联{$lang->SRCommon},可直接关联该迭代/阶段/冲刺所关联产品的{$lang->SRCommon})";
|
||||
|
||||
/* 交互提示。*/
|
||||
|
||||
@@ -1465,6 +1465,7 @@ class executionModel extends model
|
||||
if(!$withBranch) return $this->loadModel('tutorial')->getProductPairs();
|
||||
return $this->loadModel('tutorial')->getExecutionProducts();
|
||||
}
|
||||
|
||||
$query = $this->dao->select('t2.id, t2.name, t2.type, t1.branch, t1.plan')->from(TABLE_PROJECTPRODUCT)->alias('t1')
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t2')
|
||||
->on('t1.product = t2.id')
|
||||
|
||||
@@ -18,14 +18,12 @@
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class="btn-toolbar pull-left">
|
||||
<span class='btn btn-link btn-active-text'><span class='text'><?php echo $lang->execution->linkStory;?></span></span>
|
||||
<?php if($executionStories and ($this->app->rawModule == 'execution')):?>
|
||||
<span class='btn btn-link'><span class='text'><?php echo $lang->execution->linkPRJStoryTip;?></span></span>
|
||||
<?php elseif($this->app->rawModule == 'execution'):?>
|
||||
<?php if($this->app->rawModule == 'execution'):?>
|
||||
<span class='btn btn-link'><span class='text'><?php echo $lang->execution->linkAllStoryTip;?></span></span>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<?php common::printBack($this->createLink($this->app->rawModule, 'story'), 'btn btn-link');?>
|
||||
<?php common::printBack($this->createLink($this->app->rawModule, 'story', "objectID=$object->id"), 'btn btn-link');?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="mainContent">
|
||||
@@ -45,9 +43,9 @@
|
||||
<?php echo $lang->idAB;?>
|
||||
</th>
|
||||
<th class='w-pri'><?php echo $lang->priAB;?></th>
|
||||
<th><?php echo $lang->story->title;?></th>
|
||||
<th class='w-150px'><?php echo $lang->story->product;?></th>
|
||||
<th class='w-150px'><?php echo $lang->story->module;?></th>
|
||||
<th><?php echo $lang->story->title;?></th>
|
||||
<th class='w-120px'><?php echo $lang->story->plan;?></th>
|
||||
<th class='w-80px'><?php echo $lang->story->stage;?></th>
|
||||
<?php if($productType != 'normal'):?>
|
||||
@@ -67,14 +65,14 @@
|
||||
<?php echo html::hidden("products[$story->id]", $story->product);?>
|
||||
</td>
|
||||
<td><span class='label-pri <?php echo 'label-pri-' . $story->pri;?>' title='<?php echo zget($lang->story->priList, $story->pri, $story->pri);?>'><?php echo zget($lang->story->priList, $story->pri, $story->pri);?></span></td>
|
||||
<td class='text-left' title='<?php echo $products[$story->product]->name?>'><?php echo html::a($this->createLink('product', 'browse', "productID=$story->product&branch=$story->branch"), $products[$story->product]->name, '_blank');?></td>
|
||||
<td class='text-left' title='<?php echo zget($modules, $story->module, '')?>'><?php echo zget($modules, $story->module, '')?></td>
|
||||
<td class='text-left nobr' title="<?php echo $story->title?>">
|
||||
<?php
|
||||
if($story->parent > 0) echo "<span class='label'>{$lang->story->childrenAB}</span>";
|
||||
echo html::a($storyLink, $story->title);
|
||||
?>
|
||||
</td>
|
||||
<td class='text-left' title='<?php echo $products[$story->product]->name?>'><?php echo html::a($this->createLink('product', 'browse', "productID=$story->product&branch=$story->branch"), $products[$story->product]->name, '_blank');?></td>
|
||||
<td class='text-left' title='<?php echo zget($modules, $story->module, '')?>'><?php echo zget($modules, $story->module, '')?></td>
|
||||
<td class='text-ellipsis' title='<?php echo $story->planTitle;?>'><?php echo $story->planTitle;?></td>
|
||||
<td><?php echo zget($lang->story->stageList, $story->stage);?></td>
|
||||
<?php if($productType != 'normal'):?>
|
||||
@@ -97,7 +95,7 @@
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div class="table-empty-tip">
|
||||
<p><span class="text-muted"><?php echo $lang->execution->whyNoStories;?></p>
|
||||
<p><span class="text-muted"><?php echo $lang->{$app->rawModule}->whyNoStories;?></p>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</form>
|
||||
|
||||
@@ -251,7 +251,10 @@ class product extends control
|
||||
/* Build search form. */
|
||||
$rawModule = $this->app->rawModule;
|
||||
$rawMethod = $this->app->rawMethod;
|
||||
$actionURL = $this->createLink($rawModule, $rawMethod, "productID=$productID&branch=$branch&browseType=bySearch&queryID=myQueryID&storyType=$storyType");
|
||||
|
||||
$params = $rawModule == 'projectstory' ? "projectID=$projectID&" : '';
|
||||
$actionURL = $this->createLink($rawModule, $rawMethod, $params . "productID=$productID&branch=$branch&browseType=bySearch&queryID=myQueryID&storyType=$storyType");
|
||||
|
||||
$this->config->product->search['onMenuBar'] = 'yes';
|
||||
$this->product->buildSearchForm($productID, $this->products, $queryID, $actionURL);
|
||||
|
||||
|
||||
@@ -160,12 +160,13 @@ class projectModel extends model
|
||||
* Get a project by id.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param string $type project|sprint,stage
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getByID($projectID)
|
||||
public function getByID($projectID, $type = 'project')
|
||||
{
|
||||
$project = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($projectID)->andWhere('`type`')->eq('project')->fetch();
|
||||
$project = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($projectID)->andWhere('`type`')->in($type)->fetch();
|
||||
if(!$project) return false;
|
||||
|
||||
if($project->end == '0000-00-00') $project->end = '';
|
||||
|
||||
@@ -7,6 +7,7 @@ $lang->projectstory->track = 'Tracking Matrix';
|
||||
$lang->projectstory->linkStory = 'Linked' . $lang->SRCommon;
|
||||
$lang->projectstory->unlinkStory = 'Unlinked' . $lang->SRCommon;
|
||||
$lang->projectstory->importplanstories = 'Linked by plan' . $lang->SRCommon;
|
||||
$lang->projectstory->whyNoStories = "No story can be linked. Please check whether there is any story in project which is linked to {$lang->productCommon} and make sure it has been reviewed.";
|
||||
|
||||
global $app;
|
||||
$app->loadLang('product');
|
||||
|
||||
@@ -7,6 +7,7 @@ $lang->projectstory->track = '矩阵';
|
||||
$lang->projectstory->linkStory = '关联' . $lang->SRCommon;
|
||||
$lang->projectstory->unlinkStory = '移除' . $lang->SRCommon;
|
||||
$lang->projectstory->importplanstories = '按计划关联' . $lang->SRCommon;
|
||||
$lang->projectstory->whyNoStories = "看起来没有{$lang->SRCommon}可以关联。请检查下项目关联的{$lang->productCommon}中有没有{$lang->SRCommon},而且要确保它们已经审核通过。";
|
||||
|
||||
global $app;
|
||||
$app->loadLang('product');
|
||||
|
||||
@@ -2191,7 +2191,7 @@ class storyModel extends model
|
||||
{
|
||||
if($executionID != '')
|
||||
{
|
||||
$products = $this->loadModel('execution')->getProducts($executionID);
|
||||
$products = $this->loadModel('project')->getProducts($executionID);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -42,22 +42,6 @@ class testcase extends control
|
||||
|
||||
/* Set test case menu group. */
|
||||
$this->projectID = isset($_GET['PRJ']) ? $_GET['PRJ'] : 0;
|
||||
if($this->app->openApp == 'qa')
|
||||
{
|
||||
$this->app->loadConfig('qa');
|
||||
foreach($this->config->qa->menuList as $module) $this->lang->navGroup->$module = 'qa';
|
||||
}
|
||||
elseif($this->app->openApp == 'project')
|
||||
{
|
||||
$this->lang->testcase->menu = $this->lang->projectQa->menu;
|
||||
$this->lang->testcase->subMenu = $this->lang->projectQa->subMenu;
|
||||
}
|
||||
elseif($this->app->openApp == 'execution')
|
||||
{
|
||||
$this->lang->testcase->menu = $this->lang->execution->qaMenu;
|
||||
$this->lang->testcase->subMenu = '';
|
||||
}
|
||||
|
||||
$this->view->products = $this->products = $this->product->getProductPairsByProject($this->projectID);
|
||||
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "fromModule=testcase")));
|
||||
}
|
||||
@@ -251,7 +235,10 @@ class testcase extends control
|
||||
*/
|
||||
public function create($productID, $branch = '', $moduleID = 0, $from = '', $param = 0, $storyID = 0, $extras = '')
|
||||
{
|
||||
if($this->app->openApp == 'execution') commonModel::setAppObjectID('execution', $this->session->execution);
|
||||
if($this->app->openApp == 'execution')
|
||||
{
|
||||
$this->loadModel('execution')->setMenu($this->session->execution);
|
||||
}
|
||||
|
||||
$testcaseID = $from == 'testcase' ? $param : 0;
|
||||
$bugID = $from == 'bug' ? $param : 0;
|
||||
|
||||
Reference in New Issue
Block a user