* Fix bug if the execution doesn't have the products.

This commit is contained in:
liumengyi
2024-04-25 17:12:03 +08:00
committed by caoyanyi
parent 8f227f77a0
commit 3f9ab0d3e0
3 changed files with 7 additions and 1 deletions
+1
View File
@@ -1110,6 +1110,7 @@ class execution extends control
->setIF($this->post->status == 'closed' && $oldExecution->status != 'closed', 'closedDate', helper::now())
->setIF($this->post->status == 'suspended' && $oldExecution->status != 'suspended', 'suspendedDate', helper::today())
->setIF($oldExecution->type == 'stage', 'project', $oldExecution->project)
->setDefault('project', $oldExecution->project)
->setDefault('team', $this->post->name)
->setDefault('branch', $this->post->branch)
->setDefault('attribute', $oldExecution->attribute)
+1 -1
View File
@@ -35,7 +35,7 @@ if($project)
}
elseif($project->model == 'agileplus')
{
$fields->field('project')
$fields->field('type')
->label($lang->execution->method)
->disabled()
->value(zget($lang->execution->typeList, data('execution.type')));
+5
View File
@@ -1796,6 +1796,11 @@ class executionZen extends execution
$this->view->plan = $plan;
}
if(isset($project->hasProduct) && empty($project->hasProduct))
{
$product = $this->loadModel('product')->getShadowProductByProject($project->id);
$products = array($product->id => $product->name);
}
return $products;
}