diff --git a/module/story/control.php b/module/story/control.php index 556a93c144..6fd20afda2 100755 --- a/module/story/control.php +++ b/module/story/control.php @@ -2663,6 +2663,7 @@ class story extends control */ public function ajaxGetProductStories($productID, $branch = 0, $moduleID = 0, $storyID = 0, $onlyOption = 'false', $status = '', $limit = 0, $type = 'full', $hasParent = 1, $objectID = 0, $number = '') { + $hasParent = (bool)$hasParent; if($moduleID) { $moduleID = $this->loadModel('tree')->getStoryModule($moduleID); diff --git a/module/testcase/control.php b/module/testcase/control.php index b4bd907407..f9006a7f52 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -608,7 +608,7 @@ class testcase extends control /* Logic of task 44139. */ if(!in_array($this->app->tab, array('execution', 'project')) and empty($stories)) { - $stories = $this->story->getProductStoryPairs($productID, $branch, 0, $storyStatus, 'id_desc', 0, 'full', 'story', 1); + $stories = $this->story->getProductStoryPairs($productID, $branch, 0, $storyStatus, 'id_desc', 0, 'full', 'story', false); } if($storyID and !isset($stories[$storyID])) $stories = $this->story->formatStories(array($storyID => $story)) + $stories;//Fix bug #2406. @@ -1072,7 +1072,7 @@ class testcase extends control /* Logic of task 44139. */ if(!in_array($this->app->tab, array('execution', 'project')) and empty($stories)) { - $stories = $this->story->getProductStoryPairs($case->product, $case->branch, 0, $storyStatus, 'id_desc', 0, 'full', 'story', 1); + $stories = $this->story->getProductStoryPairs($case->product, $case->branch, 0, $storyStatus, 'id_desc', 0, 'full', 'story', false); } $this->view->productID = $productID; diff --git a/module/testcase/js/common.js b/module/testcase/js/common.js index 3337c003fc..8c134c068c 100644 --- a/module/testcase/js/common.js +++ b/module/testcase/js/common.js @@ -132,7 +132,7 @@ function setStories() productID = $('#product').val(); branch = $('#branch').val(); if(typeof(branch) == 'undefined') branch = 0; - link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID + '&branch=' + branch + '&moduleID=' + moduleID + '&storyID=0&onlyOption=false&status=noclosed&limit=0&type=full&hasParent=1&objectID=' + objectID); + link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID + '&branch=' + branch + '&moduleID=' + moduleID + '&storyID=0&onlyOption=false&status=noclosed&limit=0&type=full&hasParent=0&objectID=' + objectID); $.get(link, function(stories) {