diff --git a/module/bug/js/batchcreate.js b/module/bug/js/batchcreate.js index 2c7f66e6a1..41834f78d2 100644 --- a/module/bug/js/batchcreate.js +++ b/module/bug/js/batchcreate.js @@ -27,7 +27,7 @@ function setBranchRelated(branchID, productID, num) $("#modules" + num).chosen(); }); - executionLink = createLink('product', 'ajaxGetExecutions', 'productID=' + productID + '&executionID=0&branch=' + branchID + '&num=' + num); + executionLink = createLink('product', 'ajaxGetExecutions', 'productID=' + productID + '&projectID=0&branch=' + branchID + '&num=' + num); $.get(executionLink, function(executions) { if(!executions) executions = ''; diff --git a/module/build/js/edit.js b/module/build/js/edit.js index 75f685f686..9c4a7505b0 100644 --- a/module/build/js/edit.js +++ b/module/build/js/edit.js @@ -1,8 +1,10 @@ +var oldExecutionID = $('#execution').val(); + function loadExecutions() { var productID = $('#product').val(); var branchID = $('#branch').length > 0 ? $('#branch').val() : 0; - $('#executionsBox').load(createLink('product', 'ajaxGetExecutions', 'productID=' + productID + '&executionID=0&branch=' + branchID), function() + $('#executionsBox').load(createLink('product', 'ajaxGetExecutions', 'productID=' + productID + '&projectID=0&branch=' + branchID + '&number=&executionID=' + oldExecutionID), function() { $('#executionsBox #execution').chosen().removeAttr('onchange'); }); diff --git a/module/build/view/edit.html.php b/module/build/view/edit.html.php index e0726ab0bf..6366cbf545 100644 --- a/module/build/view/edit.html.php +++ b/module/build/view/edit.html.php @@ -89,4 +89,5 @@ +project)?> diff --git a/module/product/control.php b/module/product/control.php index 08a467b743..2a29cbdc26 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -855,15 +855,16 @@ class product extends control * AJAX: get executions of a product in html select. * * @param int $productID - * @param int $executionID + * @param int $projectID * @param int $branch * @param string $number + * @param int $executionID * @access public * @return void */ - public function ajaxGetExecutions($productID, $executionID = 0, $branch = 0, $number = '') + public function ajaxGetExecutions($productID, $projectID = 0, $branch = 0, $number = '', $executionID = 0) { - $executions = $this->product->getExecutionPairsByProduct($productID, $branch ? "0,$branch" : $branch, 'id_desc', $executionID); + $executions = $this->product->getExecutionPairsByProduct($productID, $branch ? "0,$branch" : $branch, 'id_desc', $projectID); if($this->app->getViewType() == 'json') die(json_encode($executions)); if($number === '')