* Finish task#7948.

This commit is contained in:
qiyu-xie
2020-09-17 11:20:05 +08:00
parent 3235db1db5
commit fa63b6dc43
4 changed files with 9 additions and 4 deletions
+3 -2
View File
@@ -415,14 +415,15 @@ function loadProjectBuilds(projectID)
*
* @param moduleID $moduleID
* @param productID $productID
* @param storyID $storyID
* @access public
* @return void
*/
function setStories(moduleID, productID)
function setStories(moduleID, productID, storyID)
{
var branch = $('#branch').val();
if(typeof(branch) == 'undefined') branch = 0;
link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID + '&branch=' + branch + '&moduleID=' + moduleID);
link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID + '&branch=' + branch + '&moduleID=' + moduleID + '&storyID=' + storyID);
$.get(link, function(stories)
{
if(!stories) stories = '<select id="story" name="story" class="form-control"></select>';
+2 -1
View File
@@ -42,8 +42,9 @@ function loadModuleRelated()
{
var moduleID = $('#module').val();
var productID = $('#product').val();
var storyID = $('#story').val();
setAssignedTo(moduleID, productID);
setStories(moduleID, productID);
setStories(moduleID, productID, storyID);
}
/**
+2 -1
View File
@@ -52,5 +52,6 @@ function loadModuleRelated()
{
moduleID = $('#module').val();
productID = $('#product').val();
setStories(moduleID, productID);
storyID = $('#story').val();
setStories(moduleID, productID, storyID);
}
+2
View File
@@ -1503,6 +1503,8 @@ class story extends control
}
$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'");
/* If only need options, remove select wrap. */