-

story->batchCreate;?>

+

lang->story->subdivide : $this->lang->story->batchCreate;?>

createLink('file', 'uploadImages', 'module=story¶ms=' . helper::safe64Encode("productID=$productID&branch=$branch&moduleID=$moduleID")), $lang->uploadImages, '', "data-toggle='modal' data-type='iframe' class='btn btn-primary' data-width='70%'")?> diff --git a/module/story/view/edit.html.php b/module/story/view/edit.html.php index 9812e04ba4..c0e4e5980b 100644 --- a/module/story/view/edit.html.php +++ b/module/story/view/edit.html.php @@ -66,6 +66,7 @@
story->legendBasicInfo;?>
+ parent <= 0):?> + - + + parent >= 0):?> + + + + + - + diff --git a/module/story/view/view.html.php b/module/story/view/view.html.php index 9bec07fc79..753b2d0098 100644 --- a/module/story/view/view.html.php +++ b/module/story/view/view.html.php @@ -22,7 +22,10 @@
id?> - title;?> + + parent > 0) echo '' . $this->lang->story->childrenAB . '';?> + parent > 0) echo isset($story->parentName) ? html::a(inlink('view', "storyID={$story->parent}"), $story->parentName) . ' / ' : '';?>title;?> + version > 1):?> @@ -61,6 +64,55 @@
fetch('file', 'printFiles', array('files' => $story->files, 'fieldset' => 'true'));?> createLink('action', 'comment', "objectType=story&objectID=$story->id");?> + children)):?> +
+
lang->story->children;?>
+
+
story->product;?> @@ -76,8 +77,9 @@
story->module;?>story->module;?>
story->parent;?>parent, "class='form-control chosen'");?>
story->plan;?> @@ -153,7 +161,7 @@
story->estimate;?>estimate, "class='form-control'");?>parent >= 0 ? html::input('estimate', $story->estimate, "class='form-control'") : $story->estimate;?>
story->keywords;?>
+ + + + + + + + + + + + + children as $child):?> + + + + + + + + + + + +
story->id;?> priAB;?> story->title;?>story->assignedTo;?> story->estimate;?> story->status;?>actions;?>
id;?> + pri . "'>"; + echo $child->pri == '0' ? '' : zget($this->lang->story->priList, $child->pri, $child->pri); + echo ""; + ?> + id", '', true); ?>">title;?>assignedTo);?>estimate;?>processStatus('story', $child);?> + id", $child, 'list'); + common::printIcon('story', 'review', "storyID=$child->id", $child, 'list', '', '', 'iframe showinonlybody', true); + common::printIcon('story', 'assignTo', "storyID=$child->id", $child, 'list', '', '', 'iframe showinonlybody', true); + common::printIcon('story', 'close', "storyID=$child->id", $child, 'list', '', '', 'iframe showinonlybody', true); + common::printIcon('story', 'activate', "storyID=$child->id", $child, 'list', '', '', 'iframe showinonlybody', true); + common::printIcon('story', 'edit', "storyID=$child->id", $child, 'list'); + common::printIcon('story', 'createCase', "productID=$child->product&branch=$child->branch&module=0&from=¶m=0&story={$child->id}", $child, 'list', 'sitemap'); + ?> +
+
+
+
printExtendFields($story, 'div', "position=left&inForm=0&inCell=1");?>
@@ -72,19 +124,19 @@ id", $story, 'button', '', '', 'showinonlybody'); common::printIcon('story', 'review', "storyID=$story->id", $story, 'button', '', '', 'showinonlybody'); - if($story->status != 'closed' and !isonlybody()) + if($story->status == 'active' and $story->stage == 'wait' and $story->parent <= 0 and !isonlybody()) { $divideLang = ($story->type == 'story' || !$story->type) ? $lang->story->subdivide : $lang->story->splitRequirent; $misc = "class='btn divideStory' data-toggle='modal' data-type='iframe' data-width='95%'"; $link = $this->createLink('story', 'batchCreate', "productID=$story->product&branch=$story->branch&moduleID=$story->module&storyID=$story->id", '', true); - if(common::hasPriv('story', 'batchCreate')) echo html::a($link, " " . $divideLang, '', $misc); + if(common::hasPriv('story', 'batchCreate')) echo html::a($link, " " . $divideLang, '', $misc); } common::printIcon('story', 'assignTo', "storyID=$story->id", $story, 'button', '', '', 'iframe showinonlybody', true); common::printIcon('story', 'close', "storyID=$story->id", $story, 'button', '', '', 'iframe showinonlybody', true); common::printIcon('story', 'activate', "storyID=$story->id", $story, 'button', '', '', 'iframe showinonlybody', true); - if($config->global->flow != 'onlyStory' and !isonlybody() and (common::hasPriv('testcase', 'create') or common::hasPriv('testcase', 'batchCreate'))) + if($config->global->flow != 'onlyStory' and !isonlybody() and $story->parent >= 0 and (common::hasPriv('testcase', 'create') or common::hasPriv('testcase', 'batchCreate'))) { $this->app->loadLang('testcase'); echo "
"; diff --git a/module/task/control.php b/module/task/control.php index 778b746f31..bdef2e9af1 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -1393,7 +1393,7 @@ class task extends control $children = array(); foreach($tasks as $task) { - if(!empty($task->parent) and isset($tasks[$task->parent])) + if($task->parent > 0 and isset($tasks[$task->parent])) { $children[$task->parent][$task->id] = $task; unset($tasks[$task->id]); 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) {