diff --git a/module/execution/control.php b/module/execution/control.php index d212039839..076758ae0d 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -2069,6 +2069,8 @@ class execution extends control $this->view->productID = $productID; $this->view->branchID = $branchID; $this->view->projectID = $this->loadModel('task')->getProjectID($execution->id); + $this->view->allProducts = $this->loadModel('product')->getProductPairsByProject($this->view->projectID, 'noclosed'); + a(count($this->view->allProducts)); $this->view->allPlans = $allPlans; $this->view->kanbanData = $kanbanData; $this->view->executionActions = $executionActions; diff --git a/module/execution/js/kanban.js b/module/execution/js/kanban.js index 4f04327390..3b1b17f29a 100644 --- a/module/execution/js/kanban.js +++ b/module/execution/js/kanban.js @@ -1,9 +1,12 @@ -$('#products').change(function() +$(function() { - var selectProductID = $('#products').val(); - var attr = '/index.php?m=story&f=batchCreate&ProductID=' + selectProductID + '&branch=' + branch + '&moduleID=0&story=0&ex - $('#batchCreateStory').children().children().attr('href',attr); -}); + $('#products').change(function() + { + var selectProductID = $('#products').val(); + var attr = '/index.php?m=story&f=batchCreate&ProductID=' + selectProductID + '&branch=' + branch + '&moduleID=0&story=0&execution=' + execution + '&onlybody=yes'; + $('#batchCreateStory').children().children().attr('href',attr); + }); +}) /** * When execution status change. *