diff --git a/module/testcase/control.php b/module/testcase/control.php index ce43238469..b35fe7ffdd 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -910,13 +910,20 @@ class testcase extends control $branchTagOption[$case->branch] = $case->branch == BRANCH_MAIN ? $caseBranch : ($caseBranch->name . ($caseBranch->status == 'closed' ? ' (' . $this->lang->branch->statusList['closed'] . ')' : '')); } + $moduleIdList = $case->module; + if($case->module) + { + $moduleIdList = $this->loadModel->tree->getStoryModule($case->module); + $moduleIdList = $this->tree->getAllChildID($case->module); + } + $this->view->productID = $productID; $this->view->product = $product; $this->view->products = $this->products; $this->view->branchTagOption = $branchTagOption; $this->view->productName = $this->products[$productID]; $this->view->moduleOptionMenu = $moduleOptionMenu; - $this->view->stories = $this->story->getProductStoryPairs($productID, $case->branch, 0, 'all','id_desc', 0, 'full', 'story', false); + $this->view->stories = $this->story->getProductStoryPairs($productID, $case->branch, $moduleIdList, 'all','id_desc', 0, 'full', 'story', false); } $forceNotReview = $this->testcase->forceNotReview(); if($forceNotReview) unset($this->lang->testcase->statusList['wait']); diff --git a/module/testcase/js/batchedit.js b/module/testcase/js/batchedit.js index e82c364e91..e934894af4 100644 --- a/module/testcase/js/batchedit.js +++ b/module/testcase/js/batchedit.js @@ -99,7 +99,7 @@ $(function() var id = $(this).attr('id'); var num = id.substring(5); var moduleID = $('#modules' + num).val(); - var branchID = $('#branches' + num).val(); + var branchID = typeof($('#branches' + num).val()) == 'undefined' ? 0 : $('#branches' + num).val(); var storyID = $("#story" + num).val(); var storyLink = createLink('story', 'ajaxGetProductStories', 'productID=' + productID + '&branch=' + branchID + '&moduleID=' + moduleID + '&storyID=0&onlyOption=false&status=noclosed&limit=50&type=full&hasParent=1&executionID=0&number=' + num); $.get(storyLink, function(stories)