diff --git a/module/story/control.php b/module/story/control.php index d60632a648..a849b3c64a 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -777,17 +777,18 @@ class story extends control * @param int $productID * @param int $storyID * @param string $number + * @param string $type * @access public * @return void */ - public function ajaxGetProjectStories($projectID, $productID = 0, $moduleID = 0, $storyID = 0, $number = '') + public function ajaxGetProjectStories($projectID, $productID = 0, $moduleID = 0, $storyID = 0, $number = '', $type= 'full') { if($moduleID) { $moduleID = $this->loadModel('tree')->getStoryModule($moduleID); $moduleID = $this->tree->getAllChildID($moduleID); } - $stories = $this->story->getProjectStoryPairs($projectID, $productID, $moduleID); + $stories = $this->story->getProjectStoryPairs($projectID, $productID, $moduleID, $type); die(html::select('story' . $number, $stories, $storyID, 'class=select-1 onchange=setStoryRelated(' . $number . ');')); } diff --git a/module/task/control.php b/module/task/control.php index c5a54eecc1..91da8329b1 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -151,10 +151,7 @@ class task extends control $mails = $this->task->batchCreate($projectID); if(dao::isError()) die(js::error(dao::getError())); - foreach($mails as $mail) - { - $this->sendmail($mail->taskID, $mail->actionID); - } + foreach($mails as $mail) $this->sendmail($mail->taskID, $mail->actionID); /* Locate the browser. */ if($iframe) die(js::reload('parent.parent')); @@ -175,6 +172,7 @@ class task extends control $this->view->stories = $stories; $this->view->modules = $modules; $this->view->storyID = $storyID; + $this->view->story = $this->loadModel('story')->getByID($storyID); $this->view->members = $members; $this->display(); } diff --git a/module/task/js/batchcreate.js b/module/task/js/batchcreate.js index f11bb4c562..55c1aa57c7 100755 --- a/module/task/js/batchcreate.js +++ b/module/task/js/batchcreate.js @@ -5,7 +5,7 @@ $(function() { /* Get select of stories.*/ function setStories(moduleID, projectID, num) { - link = createLink('story', 'ajaxGetProjectStories', 'projectID=' + projectID + '&productID=0&moduleID=' + moduleID + '&storyID=0&num=' + num); + link = createLink('story', 'ajaxGetProjectStories', 'projectID=' + projectID + '&productID=0&moduleID=' + moduleID + '&storyID=0&num=' + num + '&type=short'); $.get(link, function(stories) { var storyID = $('#story' + num).val(); diff --git a/module/task/view/batchcreate.html.php b/module/task/view/batchcreate.html.php index bc39e6a907..7e7203a7e5 100644 --- a/module/task/view/batchcreate.html.php +++ b/module/task/view/batchcreate.html.php @@ -38,22 +38,22 @@ module : ''; } else { - $story = $type = $member = $module = 'ditto'; + $currentStory = $type = $member = $module = 'ditto'; } ?>