* [bug#57252,done,1h] fix error problem with story drop-down range.
This commit is contained in:
@@ -477,7 +477,8 @@ function loadProductStories(productID, storyID, moduleID = 0, executionID = 0)
|
||||
let branch = $('[name="branch"]').val();
|
||||
if(typeof(branch) == 'undefined') branch = 0;
|
||||
|
||||
const link = $.createLink('story', 'ajaxGetProductStories', 'productID=' + productID + '&branch=' + branch + '&moduleID=' + moduleID + '&storyID=' + storyID + '&onlyOption=false&status=&limit=0&type=full&hasParent=0&executionID=' + executionID);
|
||||
let oldStoryID = bug.module == moduleID ? bug.story : 0;
|
||||
const link = $.createLink('story', 'ajaxGetProductStories', 'productID=' + productID + '&branch=' + branch + '&moduleID=' + moduleID + '&storyID=' + oldStoryID + '&onlyOption=false&status=active&limit=0&type=full&hasParent=0&executionID=' + executionID);
|
||||
$.getJSON(link, function(data)
|
||||
{
|
||||
let $storyPicker = $('[name="story"]').zui('picker');
|
||||
|
||||
+19
-2
@@ -1036,8 +1036,16 @@ class bugZen extends bug
|
||||
}
|
||||
else
|
||||
{
|
||||
$stories = $this->story->getProductStoryPairs($productID, $branch, $moduleID, 'active,closed', 'id_desc', 0, '', 'story', false);
|
||||
$moduleIdList = $moduleID;
|
||||
if($moduleIdList)
|
||||
{
|
||||
$moduleIdList = $this->loadModel('tree')->getStoryModule($moduleIdList);
|
||||
$moduleIdList = $this->tree->getAllChildID($moduleIdList);
|
||||
}
|
||||
|
||||
$stories = $this->story->getProductStoryPairs($productID, $branch, $moduleIdList, 'active,closed', 'id_desc', 0, '', 'story', false);
|
||||
}
|
||||
if(!in_array($this->app->tab, array('execution', 'project')) and empty($stories)) $stories = $this->story->getProductStoryPairs($productID, $branch, 0, 'active', 'id_desc', 0, '', 'story', false);
|
||||
|
||||
if(!isset($stories[$bug->storyID]))
|
||||
{
|
||||
@@ -1265,8 +1273,17 @@ class bugZen extends bug
|
||||
}
|
||||
else
|
||||
{
|
||||
$stories = $this->story->getProductStoryPairs($bug->product, $bug->branch, 0, 'active,closed', 'id_desc', 0, '', 'story', false);
|
||||
$moduleIdList = $bug->module;
|
||||
if($moduleIdList)
|
||||
{
|
||||
$moduleIdList = $this->loadModel('tree')->getStoryModule($moduleIdList);
|
||||
$moduleIdList = $this->tree->getAllChildID($moduleIdList);
|
||||
}
|
||||
|
||||
$stories = $this->story->getProductStoryPairs($bug->product, $bug->branch, $moduleIdList, 'active', 'id_desc', 0, '', 'story', false);
|
||||
}
|
||||
if(!in_array($this->app->tab, array('execution', 'project')) and empty($stories)) $stories = $this->story->getProductStoryPairs($bug->product, $bug->branch, 0, 'active', 'id_desc', 0, '', 'story', false);
|
||||
if(!isset($stories[$bug->story])) $stories[$bug->story] = $bug->story . ':' . $bug->storyTitle;
|
||||
|
||||
$resolvedBuildPairs = $this->build->getBuildPairs(array($bug->product), $bug->branch, 'noempty');
|
||||
$this->view->resolvedBuildPairs = $resolvedBuildPairs;
|
||||
|
||||
@@ -1620,6 +1620,11 @@ class story extends control
|
||||
}
|
||||
|
||||
if(!in_array($this->app->tab, array('execution', 'project')) and empty($stories)) $stories = $this->story->getProductStoryPairs($productID, $branch, 0, $storyStatus, 'id_desc', $limit, $type, 'story', $hasParent);
|
||||
if($storyID && !isset($stories[$storyID]))
|
||||
{
|
||||
$story = $this->story->fetchByID($storyID);
|
||||
$stories[$storyID] = $story->id . ':' . $story->title;
|
||||
}
|
||||
|
||||
if($isHTML == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user