* Fix bug #15688.
This commit is contained in:
@@ -1767,7 +1767,7 @@ class story extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetProductStories($productID, $branch = 0, $moduleID = 0, $storyID = 0, $onlyOption = 'false', $status = '', $limit = 0, $type = 'full', $hasParent = 1)
|
||||
public function ajaxGetProductStories($productID, $branch = 0, $moduleID = 0, $storyID = 0, $onlyOption = 'false', $status = '', $limit = 0, $type = 'full', $hasParent = 1, $executionID = 0)
|
||||
{
|
||||
if($moduleID)
|
||||
{
|
||||
@@ -1783,7 +1783,14 @@ class story extends control
|
||||
$storyStatus = array_keys($storyStatus);
|
||||
}
|
||||
|
||||
$stories = $this->story->getProductStoryPairs($productID, $branch ? "0,$branch" : $branch, $moduleID, $storyStatus, 'id_desc', $limit, $type, 'story', $hasParent);
|
||||
if($executionID)
|
||||
{
|
||||
$stories = $this->story->getExecutionStoryPairs($executionID, $productID, $branch, $moduleID, $type);
|
||||
}
|
||||
else
|
||||
{
|
||||
$stories = $this->story->getProductStoryPairs($productID, $branch ? "0,$branch" : $branch, $moduleID, $storyStatus, 'id_desc', $limit, $type, 'story', $hasParent);
|
||||
}
|
||||
|
||||
$storyID = isset($stories[$storyID]) ? $storyID : 0;
|
||||
$select = html::select('story', empty($stories) ? array('' => '') : $stories, $storyID, "class='form-control'");
|
||||
|
||||
@@ -428,13 +428,15 @@ class testcase extends control
|
||||
if(empty($moduleID)) $moduleID = $story->module;
|
||||
}
|
||||
|
||||
$currentModuleID = (int)$moduleID ? (int)$moduleID : (int)$this->cookie->lastCaseModule;
|
||||
$currentModuleID = $moduleID ? (int)$moduleID : (int)$this->cookie->lastCaseModule;
|
||||
/* Get the status of stories are not closed. */
|
||||
$storyStatus = $this->lang->story->statusList;
|
||||
unset($storyStatus['closed']);
|
||||
$modules = array();
|
||||
if($currentModuleID)
|
||||
{
|
||||
$productModules = $this->tree->getOptionMenu($productID, 'story');
|
||||
$currentModuleID = array_key_exists($currentModuleID,$productModules) ? $currentModuleID : 0;
|
||||
$modules = $this->loadModel('tree')->getStoryModule($currentModuleID);
|
||||
$modules = $this->tree->getAllChildID($modules);
|
||||
}
|
||||
@@ -453,11 +455,11 @@ class testcase extends control
|
||||
|
||||
$this->view->title = $title;
|
||||
$this->view->position = $position;
|
||||
$this->view->projectID = isset($projectID) ? $projectID : '';
|
||||
$this->view->projectID = isset($projectID) ? $projectID : 0;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->productName = $this->products[$productID];
|
||||
$this->view->moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'case', $startModuleID = 0, $branch);
|
||||
$this->view->currentModuleID = $currentModuleID ? $currentModuleID : (int)$this->cookie->lastCaseModule;
|
||||
$this->view->currentModuleID = $currentModuleID;
|
||||
$this->view->gobackLink = (isset($output['from']) and $output['from'] == 'global') ? $this->createLink('testcase', 'browse', "productID=$productID") : '';
|
||||
$this->view->stories = $stories;
|
||||
$this->view->caseTitle = $caseTitle;
|
||||
|
||||
@@ -124,14 +124,7 @@ function setStories()
|
||||
productID = $('#product').val();
|
||||
branch = $('#branch').val();
|
||||
if(typeof(branch) == 'undefined') branch = 0;
|
||||
if(tab == 'execution')
|
||||
{
|
||||
link = createLink('story', 'ajaxGetExecutionStories', 'executionID=' + executionID + '&productID=' + productID + '&branch' + branch + '&moduleID=' + moduleID + '&storyID=0');
|
||||
}
|
||||
else
|
||||
{
|
||||
link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID + '&branch=' + branch + '&moduleID=' + moduleID + '&storyID=0&onlyOption=false&status=noclosed&limit=50');
|
||||
}
|
||||
link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID + '&branch=' + branch + '&moduleID=' + moduleID + '&storyID=0&onlyOption=false&status=noclosed&limit=50' + '&executionID' + executionID);
|
||||
|
||||
$.get(link, function(stories)
|
||||
{
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
<?php js::set('lblAfter', $lang->testcase->insertAfter);?>
|
||||
<?php js::set('isonlybody', isonlybody());?>
|
||||
<?php js::set('executionID', $projectID);?>
|
||||
<?php js::set('tab', $this->app->tab);?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
|
||||
Reference in New Issue
Block a user