* fix bug #30229.
This commit is contained in:
+10
-2
@@ -23,7 +23,15 @@ function loadProductExecutions(productID, projectID)
|
||||
|
||||
$('#executionBox').load(link, function()
|
||||
{
|
||||
$(this).find('select').chosen();
|
||||
$select = $(this).find('select');
|
||||
$tr = $(this).closest('tr');
|
||||
$tr.removeClass('hidden');
|
||||
if($select.data('multiple') == 0)
|
||||
{
|
||||
$tr.addClass('hidden');
|
||||
$select.find('option:last').prop('selected', true);
|
||||
}
|
||||
$select.chosen();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -37,7 +45,7 @@ $('#toTaskButton').on('click', function()
|
||||
{
|
||||
$('#cancelButton').click();
|
||||
link = createLink('task', 'create', 'executionID=' + executionID + '&storyID=0&moduleID=0&taskID=0&todoID=0&extra=projectID=' + projectID + '&bugID=' + bugID);
|
||||
window.parent.$.apps.open(link, 'execution');
|
||||
window.parent.$.apps.open(link, $('#execution').data('multiple') == 0 ? 'project' : 'execution');
|
||||
}
|
||||
else if(projectID == 0)
|
||||
{
|
||||
|
||||
@@ -963,13 +963,14 @@ class product extends control
|
||||
|
||||
$mode .= ($from == 'bugToTask' or empty($this->config->CRExecution)) ? 'noclosed' : '';
|
||||
$mode .= !$projectID ? ',multiple' : '';
|
||||
$project = $this->loadModel('project')->getById($projectID);
|
||||
$executions = $from == 'showImport' ? $this->product->getAllExecutionPairsByProduct($productID, $branch, $projectID) : $this->product->getExecutionPairsByProduct($productID, $branch, 'id_desc', $projectID, $mode);
|
||||
if($this->app->getViewType() == 'json') return print(json_encode($executions));
|
||||
|
||||
if($number === '')
|
||||
{
|
||||
$event = $from == 'bugToTask' ? '' : " onchange='loadExecutionRelated(this.value)'";
|
||||
return print(html::select('execution', array('' => '') + $executions, $executionID, "class='form-control' $event"));
|
||||
return print(html::select('execution', array('' => '') + $executions, $executionID, "class='form-control' data-multiple={$project->multiple} $event"));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user