* Optimize code.
This commit is contained in:
@@ -162,15 +162,17 @@ class build extends control
|
||||
if($this->app->tab == 'project') $this->loadModel('project')->setMenu($build->project);
|
||||
if($this->app->tab == 'execution') $this->execution->setMenu($build->execution);
|
||||
|
||||
$builds = array();
|
||||
if($build->execution)
|
||||
{
|
||||
$productGroups = $this->product->getProducts($build->execution);
|
||||
$branches = $this->loadModel('branch')->getList($build->product, $build->execution, 'all');
|
||||
$branches = $this->loadModel('branch')->getList($build->product, $build->execution, 'all');
|
||||
}
|
||||
else
|
||||
{
|
||||
$productGroups = $this->product->getProducts($build->project);
|
||||
$branches = $this->loadModel('branch')->getList($build->product, $build->project, 'all');
|
||||
$branches = $this->loadModel('branch')->getList($build->product, $build->project, 'all');
|
||||
$builds = $this->build->getBuildPairs($build->product, $build->branch, 'noempty,notrunk,separate,noproject');
|
||||
}
|
||||
|
||||
$executions = $this->product->getExecutionPairsByProduct($build->product, $build->branch, 'id_desc', $this->session->project, 'stagefilter');
|
||||
@@ -207,6 +209,7 @@ class build extends control
|
||||
$this->view->products = $products;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter', $build->builder);
|
||||
$this->view->build = $build;
|
||||
$this->view->builds = $builds;
|
||||
$this->view->testtaskID = $this->dao->select('id')->from(TABLE_TESTTASK)->where('build')->eq($build->id)->andWhere('deleted')->eq(0)->fetch('id');
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ $().ready(function()
|
||||
});
|
||||
}
|
||||
});
|
||||
if(!executionID) $('#product').change();
|
||||
});
|
||||
|
||||
function loadExecutions(oldExecutionID)
|
||||
|
||||
@@ -55,6 +55,7 @@ $lang->build->emptyExecution = $lang->executionCommon . 'should be not empty.';
|
||||
$lang->build->notice = new stdclass();
|
||||
$lang->build->notice->changeProduct = "The {$lang->SRCommon}, bug, or the version of the submitted test order has been linked, and its {$lang->productCommon} cannot be modified";
|
||||
$lang->build->notice->changeExecution = "The version of the submitted test order cannot be modified {$lang->executionCommon}";
|
||||
$lang->build->notice->changeBuilds = "The version of the submitted test order cannot be modified builds";
|
||||
|
||||
$lang->build->finishStories = " %s {$lang->SRCommon} sind abgeschlossen.";
|
||||
$lang->build->resolvedBugs = ' %s Bugs sind gelöst.';
|
||||
|
||||
@@ -55,6 +55,7 @@ $lang->build->emptyExecution = $lang->executionCommon . 'should be not empty.';
|
||||
$lang->build->notice = new stdclass();
|
||||
$lang->build->notice->changeProduct = "The {$lang->SRCommon}, bug, or the version of the submitted test order has been linked, and its {$lang->productCommon} cannot be modified";
|
||||
$lang->build->notice->changeExecution = "The version of the submitted test order cannot be modified {$lang->executionCommon}";
|
||||
$lang->build->notice->changeBuilds = "The version of the submitted test order cannot be modified builds";
|
||||
|
||||
$lang->build->finishStories = " Finished {$lang->SRCommon} %s";
|
||||
$lang->build->resolvedBugs = ' Resolved Bug %s';
|
||||
|
||||
@@ -55,6 +55,7 @@ $lang->build->emptyExecution = $lang->executionCommon . 'should be not empty.';
|
||||
$lang->build->notice = new stdclass();
|
||||
$lang->build->notice->changeProduct = "The {$lang->SRCommon}, bug, or the version of the submitted test order has been linked, and its {$lang->productCommon} cannot be modified";
|
||||
$lang->build->notice->changeExecution = "The version of the submitted test order cannot be modified {$lang->executionCommon}";
|
||||
$lang->build->notice->changeBuilds = "The version of the submitted test order cannot be modified builds";
|
||||
|
||||
$lang->build->finishStories = " {$lang->SRCommon} Terminées %s";
|
||||
$lang->build->resolvedBugs = ' Bugs Résolus %s';
|
||||
|
||||
@@ -51,6 +51,7 @@ $lang->build->noBuild = 'Không có bản dựng nào';
|
||||
$lang->build->notice = new stdclass();
|
||||
$lang->build->notice->changeProduct = "The {$lang->SRCommon}, bug, or the version of the submitted test order has been linked, and its {$lang->productCommon} cannot be modified";
|
||||
$lang->build->notice->changeExecution = "The version of the submitted test order cannot be modified {$lang->executionCommon}";
|
||||
$lang->build->notice->changeBuilds = "The version of the submitted test order cannot be modified builds";
|
||||
|
||||
$lang->build->finishStories = " {$lang->SRCommon} đã kết thúc %s";
|
||||
$lang->build->resolvedBugs = ' Bug đã giải quyết %s';
|
||||
|
||||
@@ -55,6 +55,7 @@ $lang->build->emptyExecution = $lang->executionCommon . '不能为空。';
|
||||
$lang->build->notice = new stdclass();
|
||||
$lang->build->notice->changeProduct = "已经关联{$lang->SRCommon}、Bug或提交测试单的版本,不能修改其所属{$lang->productCommon}";
|
||||
$lang->build->notice->changeExecution = "提交测试单的版本,不能修改其所属{$lang->executionCommon}";
|
||||
$lang->build->notice->changeBuilds = "提交测试单的版本,不能修改关联版本";
|
||||
|
||||
$lang->build->finishStories = " 本次共完成 %s 个{$lang->SRCommon}";
|
||||
$lang->build->resolvedBugs = ' 本次共解决 %s 个Bug';
|
||||
|
||||
@@ -42,13 +42,14 @@
|
||||
</td>
|
||||
<td><?php if($disabled) echo $lang->build->notice->changeProduct;?></td>
|
||||
</tr>
|
||||
<?php $disabled = $testtaskID ? 'disabled' : '';?>
|
||||
<?php if(!$build->execution):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->build->common;?></th>
|
||||
<td id='buildBox'><?php echo html::select('builds', array(), '', "class='form-control chosen' multiple");?></td>
|
||||
<td id='buildBox'><?php echo html::select('builds[]', $builds, $build->builds, "class='form-control chosen' multiple $disabled");?></td>
|
||||
<td><?php if($disabled) echo $lang->build->notice->changeBuilds;?></td>
|
||||
</tr>
|
||||
<?php elseif(!empty($multipleProject)):?>
|
||||
<?php $disabled = $testtaskID ? 'disabled' : '';?>
|
||||
<th><?php echo $lang->build->execution;?></th>
|
||||
<td id='executionsBox'><?php echo html::select('execution', $executions, $build->execution, "class='form-control chosen' required $disabled");?></td>
|
||||
<td><?php if($disabled) echo $lang->build->notice->changeExecution;?></td>
|
||||
|
||||
Reference in New Issue
Block a user