Merge branch 'zentaopms_258_wangyuting' into 'master'

* Fix bug.

See merge request easycorp/zentaopms!6128
This commit is contained in:
王怡栋
2022-11-14 03:17:27 +00:00
+6 -1
View File
@@ -311,11 +311,16 @@ class buildModel extends model
$build->stories = '';
$build->bugs = '';
if($projectID)
if($projectID && !$executionID)
{
$project = $this->loadModel('project')->getByID($projectID);
if(!$project->multiple) $executionID = $this->dao->select('id')->from(TABLE_EXECUTION)->where('project')->eq($projectID)->fetch('id');
}
else if($executionID && !$projectID)
{
$execution = $this->loadModel('execution')->getByID($executionID);
$projectID = $execution->project;
}
$build = fixer::input('post')
->setDefault('project', $projectID)