diff --git a/module/task/js/create.js b/module/task/js/create.js
index f35f137c43..08ad7b1547 100644
--- a/module/task/js/create.js
+++ b/module/task/js/create.js
@@ -274,7 +274,7 @@ function setLane(regionID)
}
/* Get select of stories.*/
-function setStories(moduleID)
+function setStories(moduleID, executionID)
{
link = createLink('story', 'ajaxGetExecutionStories', 'executionID=' + executionID + '&productID=0&branch=all&moduleID=' + moduleID + '&storyID=0&number=&type=full&status=unclosed');
$.get(link, function(stories)
diff --git a/module/task/view/create.html.php b/module/task/view/create.html.php
index 2945a31283..ff4ce54b29 100644
--- a/module/task/view/create.html.php
+++ b/module/task/view/create.html.php
@@ -13,7 +13,6 @@
-id);?>
id));?>
task->error->teamMember);?>
@@ -60,7 +59,7 @@ foreach(explode(',', $config->task->create->requiredFields) as $field)
| task->module;?> |
- module, "class='form-control chosen' onchange='setStories(this.value)'");?> |
+ module, "class='form-control chosen' onchange='setStories(this.value, $execution->id)'");?> |
>
diff --git a/module/tree/control.php b/module/tree/control.php
index 148073abad..2255856940 100644
--- a/module/tree/control.php
+++ b/module/tree/control.php
@@ -517,7 +517,7 @@ class tree extends control
{
$changeFunc = '';
if($viewType == 'bug' or $viewType == 'case') $changeFunc = "onchange='loadModuleRelated()'";
- if($viewType == 'task') $changeFunc = "onchange='setStories(this.value)'";
+ if($viewType == 'task') $changeFunc = "onchange='setStories(this.value, $rootID)'";
$field = $fieldID ? "modules[$fieldID]" : 'module';
$currentModule = $this->tree->getById($currentModuleID);
@@ -539,7 +539,8 @@ class tree extends control
if($returnType == 'mhtml')
{
$changeFunc = '';
- if($viewType == 'task' or $viewType == 'bug' or $viewType == 'case') $changeFunc = "onchange='loadModuleRelated()'";
+ if($viewType == 'bug' or $viewType == 'case') $changeFunc = "onchange='loadModuleRelated()'";
+ if($viewType == 'task') $changeFunc = "onchange='setStories(this.value, $rootID)'";
$field = $fieldID ? "modules[$fieldID]" : 'module';
$output = html::select("$field", $optionMenu, '', "class='input' $changeFunc");
die($output);
|