diff --git a/module/build/view/linkstory.html.php b/module/build/view/linkstory.html.php
index 192bd79da9..f55673e272 100644
--- a/module/build/view/linkstory.html.php
+++ b/module/build/view/linkstory.html.php
@@ -46,7 +46,12 @@
id => sprintf('%03d', $story->id)), ($story->stage == 'developed' or $story->status == 'closed') ? $story->id : '');?>
story->priList, $story->pri, $story->pri)?> |
- createLink('story', 'view', "storyID=$story->id", '', true), $story->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'");?> |
+
+ parent > 0) echo "{$lang->story->childrenAB}";
+ echo html::a($this->createLink('story', 'view', "storyID=$story->id", '', true), $story->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'");
+ ?>
+ |
openedBy);?> |
assignedTo);?> |
estimate;?> |
diff --git a/module/build/view/view.html.php b/module/build/view/view.html.php
index c9cc0175e8..52163dc109 100644
--- a/module/build/view/view.html.php
+++ b/module/build/view/view.html.php
@@ -130,7 +130,12 @@ tbody tr td:first-child input{display:none;}
story->priList, $story->pri, $story->pri);?> |
- title, '', "class='iframe' data-width='1000'");?> |
+
+ parent > 0) echo "{$lang->story->childrenAB}";
+ echo html::a($storyLink,$story->title, '', "class='iframe' data-width='1000'");
+ ?>
+ |
openedBy);?> |
estimate;?> |
diff --git a/module/productplan/view/linkstory.html.php b/module/productplan/view/linkstory.html.php
index 222a65849b..da8cd73dc9 100644
--- a/module/productplan/view/linkstory.html.php
+++ b/module/productplan/view/linkstory.html.php
@@ -50,7 +50,12 @@
| pri;?>' title='story->priList, $story->pri, $story->pri)?>'>story->priList, $story->pri, $story->pri)?> |
planTitle;?> |
module];?> |
- createLink('story', 'view', "storyID=$story->id", '', true), $story->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'");?> |
+
+ parent > 0) echo "{$lang->story->childrenAB}";
+ echo html::a($this->createLink('story', 'view', "storyID=$story->id", '', true), $story->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'");
+ ?>
+ |
openedBy);?> |
assignedTo);?> |
estimate;?> |
diff --git a/module/productplan/view/view.html.php b/module/productplan/view/view.html.php
index 266d99e53b..6f74b29c35 100644
--- a/module/productplan/view/view.html.php
+++ b/module/productplan/view/view.html.php
@@ -145,7 +145,12 @@
|
pri;?>' title='story->priList, $story->pri, $story->pri);?>'>story->priList, $story->pri, $story->pri);?> |
module, '');?> |
- title);?> |
+
+ parent > 0) echo "{$lang->story->childrenAB}";
+ echo html::a($viewLink , $story->title);
+ ?>
+ |
openedBy);?> |
assignedTo);?> |
estimate;?> |
diff --git a/module/project/view/linkstory.html.php b/module/project/view/linkstory.html.php
index e42f48b3e1..a060ff0157 100644
--- a/module/project/view/linkstory.html.php
+++ b/module/project/view/linkstory.html.php
@@ -64,7 +64,12 @@
pri;?>' title='story->priList, $story->pri, $story->pri);?>'>story->priList, $story->pri, $story->pri);?> |
createLink('product', 'browse', "productID=$story->product&branch=$story->branch"), $products[$story->product]->name, '_blank');?> |
'>module, '')?> |
- title);?> |
+
+ parent > 0) echo "{$lang->story->childrenAB}";
+ echo html::a($storyLink, $story->title);
+ ?>
+ |
planTitle;?> |
story->stageList, $story->stage);?> |
diff --git a/module/project/view/story.html.php b/module/project/view/story.html.php
index bce2c41a31..8a15781079 100644
--- a/module/project/view/story.html.php
+++ b/module/project/view/story.html.php
@@ -158,6 +158,7 @@
pri?>' title='story->priList, $story->pri, $story->pri);?>'>story->priList, $story->pri, $story->pri);?> |
product][$story->branch])) echo "" . $branchGroups[$story->product][$story->branch] . '';?>
+ parent > 0) echo "{$lang->story->childrenAB}";?>
title, null, "style='color: $story->color'");?>
|
openedBy);?> |
diff --git a/module/release/view/linkstory.html.php b/module/release/view/linkstory.html.php
index f9d4b127c2..923f5fbdaf 100644
--- a/module/release/view/linkstory.html.php
+++ b/module/release/view/linkstory.html.php
@@ -50,7 +50,12 @@
id);?>
pri;?>' title='story->priList, $story->pri)?>'>story->priList, $story->pri)?> |
- createLink('story', 'view', "storyID=$story->id", '', true), $story->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'");?> |
+
+ parent > 0) echo "{$lang->story->childrenAB}";
+ echo html::a($this->createLink('story', 'view', "storyID=$story->id", '', true), $story->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'");
+ ?>
+ |
openedBy);?> |
assignedTo);?> |
estimate;?> |
diff --git a/module/release/view/view.html.php b/module/release/view/view.html.php
index 8d24b32c67..d46696709e 100644
--- a/module/release/view/view.html.php
+++ b/module/release/view/view.html.php
@@ -105,7 +105,12 @@
id);?>
pri;?>' title='story->priList, $story->pri, $story->pri);?>'>story->priList, $story->pri, $story->pri);?> |
- title, '', "class='preview'");?> |
+
+ parent > 0) echo "{$lang->story->childrenAB}";
+ echo html::a($storyLink,$story->title, '', "class='preview'");
+ ?>
+ |
openedBy);?> |
estimate;?> |
diff --git a/module/story/control.php b/module/story/control.php
index 8da91860a2..7400f88687 100644
--- a/module/story/control.php
+++ b/module/story/control.php
@@ -1332,7 +1332,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')
+ public function ajaxGetProductStories($productID, $branch = 0, $moduleID = 0, $storyID = 0, $onlyOption = 'false', $status = '', $limit = 0, $type = 'full', $hasParent = 1)
{
if($moduleID)
{
@@ -1348,7 +1348,7 @@ class story extends control
$storyStatus = array_keys($storyStatus);
}
- $stories = $this->story->getProductStoryPairs($productID, $branch ? "0,$branch" : $branch, $moduleID, $storyStatus, 'id_desc', $limit, $type);
+ $stories = $this->story->getProductStoryPairs($productID, $branch ? "0,$branch" : $branch, $moduleID, $storyStatus, 'id_desc', $limit, $type, 'story', $hasParent);
$select = html::select('story', empty($stories) ? array('' => '') : $stories, $storyID, "class='form-control'");
/* If only need options, remove select wrap. */
diff --git a/module/story/model.php b/module/story/model.php
index 8b298d99a6..0109ec631b 100644
--- a/module/story/model.php
+++ b/module/story/model.php
@@ -1610,10 +1610,11 @@ class storyModel extends model
* @param int $limit
* @param string $type
* @param string $storyType requirement|story
+ * @param bool $hasParent
* @access public
* @return array
*/
- public function getProductStoryPairs($productID = 0, $branch = 0, $moduleIdList = 0, $status = 'all', $order = 'id_desc', $limit = 0, $type = 'full', $storyType = 'story')
+ public function getProductStoryPairs($productID = 0, $branch = 0, $moduleIdList = 0, $status = 'all', $order = 'id_desc', $limit = 0, $type = 'full', $storyType = 'story', $hasParent = true)
{
if($branch) $branch = "0,$branch";//Fix bug 1059.
$stories = $this->dao->select('t1.id, t1.title, t1.module, t1.pri, t1.estimate, t2.name AS product')
@@ -1622,6 +1623,7 @@ class storyModel extends model
->beginIF($productID)->andWhere('t1.product')->in($productID)->fi()
->beginIF($moduleIdList)->andWhere('t1.module')->in($moduleIdList)->fi()
->beginIF($branch)->andWhere('t1.branch')->in($branch)->fi()
+ ->beginIF(!$hasParent)->andWhere('t1.parent')->ge(0)->fi()
->beginIF($status and $status != 'all')->andWhere('t1.status')->in($status)->fi()
->andWhere('t1.deleted')->eq(0)
->andWhere('t1.type')->eq($storyType)
diff --git a/module/testcase/control.php b/module/testcase/control.php
index 016903c479..4ff0d1634d 100644
--- a/module/testcase/control.php
+++ b/module/testcase/control.php
@@ -328,7 +328,7 @@ class testcase extends control
$modules = $this->loadModel('tree')->getStoryModule($currentModuleID);
$modules = $this->tree->getAllChildID($modules);
}
- $stories = $this->story->getProductStoryPairs($productID, $branch, $modules, array_keys($storyStatus), 'id_desc', 50, 'null');
+ $stories = $this->story->getProductStoryPairs($productID, $branch, $modules, array_keys($storyStatus), 'id_desc', 50, 'null', 'story', false);
if($storyID and !isset($stories[$storyID])) $stories = $this->story->formatStories(array($storyID => $story)) + $stories;//Fix bug #2406.
/* Set custom. */
diff --git a/module/testcase/js/batchcreate.js b/module/testcase/js/batchcreate.js
index 52aca5f003..d6153d2d5f 100644
--- a/module/testcase/js/batchcreate.js
+++ b/module/testcase/js/batchcreate.js
@@ -23,7 +23,7 @@ $(document).ready(function()
}
}
}
- var link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID + '&branch=' + branch + '&moduleID=' + moduleID + '&storyID='+ ($(select).val() || '0') + '&onlyOption=true&status=noclosed&limit=0&type=null');
+ var link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID + '&branch=' + branch + '&moduleID=' + moduleID + '&storyID='+ ($(select).val() || '0') + '&onlyOption=true&status=noclosed&limit=0&type=null&hasParent=0');
var $story = $('#story' + index);
if($story.data('loadLink') !== link)
{
|