* Fix bug #11915.
This commit is contained in:
@@ -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 = '<select id="executions' + num + '" name="executions[' + num + ']" class="form-control"></select>';
|
||||
|
||||
@@ -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');
|
||||
});
|
||||
|
||||
@@ -89,4 +89,5 @@
|
||||
</div>
|
||||
</div>
|
||||
<?php js::set('productGroups', $productGroups)?>
|
||||
<?php js::set('projectID', $build->project)?>
|
||||
<?php include '../../common/view/footer.html.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 === '')
|
||||
|
||||
Reference in New Issue
Block a user