Merge branch 'sprint/tianshujie_fixbug' into 'master'
Sprint/tianshujie fixbug See merge request easycorp/zentaopms!2433
This commit is contained in:
@@ -1504,6 +1504,8 @@ class bug extends control
|
||||
public function resolve($bugID, $extra = '')
|
||||
{
|
||||
$bug = $this->bug->getById($bugID);
|
||||
if($bug->execution) $execution = $this->loadModel('execution')->getByID($bug->execution);
|
||||
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$changes = $this->bug->resolve($bugID, $extra);
|
||||
@@ -1535,7 +1537,6 @@ class bug extends control
|
||||
parse_str($extra, $output);
|
||||
if(isonlybody())
|
||||
{
|
||||
$execution = $this->loadModel('execution')->getByID($bug->execution);
|
||||
if(isset($execution->type) and $execution->type == 'kanban' and $this->app->tab == 'execution')
|
||||
{
|
||||
$regionID = isset($output['regionID']) ? $output['regionID'] : 0;
|
||||
@@ -1576,6 +1577,7 @@ class bug extends control
|
||||
$this->view->executions = $this->loadModel('product')->getExecutionPairsByProduct($productID, $bug->branch ? "0,{$bug->branch}" : 0, 'id_desc', $projectID);
|
||||
$this->view->builds = $this->loadModel('build')->getBuildPairs($productID, $bug->branch, 'withbranch');
|
||||
$this->view->actions = $this->action->getList('bug', $bugID);
|
||||
$this->view->execution = isset($execution) ? $execution : '';
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
+10
-1
@@ -1055,7 +1055,16 @@ class bugModel extends model
|
||||
if($bug->resolution == 'duplicate' and !$this->post->duplicateBug) dao::$errors[] = sprintf($this->lang->error->notempty, $this->lang->bug->duplicateBug);
|
||||
|
||||
if(empty($bug->buildName)) dao::$errors['buildName'][] = sprintf($this->lang->error->notempty, $this->lang->bug->placeholder->newBuildName);
|
||||
if(empty($bug->buildExecution)) dao::$errors['buildExecution'][] = sprintf($this->lang->error->notempty, $this->lang->bug->execution);
|
||||
if(empty($bug->buildExecution))
|
||||
{
|
||||
$executionLang = $this->lang->bug->execution;
|
||||
if($oldBug->execution)
|
||||
{
|
||||
$execution = $this->loadModel('execution')->getByID($oldBug->execution);
|
||||
if($execution->type == 'kanban') $executionLang = $this->lang->bug->kanban;
|
||||
}
|
||||
dao::$errors['buildExecution'][] = sprintf($this->lang->error->notempty, $executionLang);
|
||||
}
|
||||
if(dao::isError()) return false;
|
||||
|
||||
$buildData = new stdclass();
|
||||
|
||||
@@ -44,7 +44,7 @@ js::set('productID' , $bug->product);
|
||||
<th><?php echo $lang->bug->resolvedBuild;?></th>
|
||||
<td id='newBuildExecutionBox' class='hidden'>
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon'><?php echo $lang->build->execution;?></span>
|
||||
<span class='input-group-addon'><?php echo (!empty($execution) and $execution->type == 'kanban') ? $lang->bug->kanban : $lang->build->execution;?></span>
|
||||
<?php echo html::select('buildExecution', $executions, '', "class='form-control chosen'");?>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user