From def5bab5f495de24f14bf915c8b66f420ca11be4 Mon Sep 17 00:00:00 2001 From: wangyuting <851424971@qq.com> Date: Mon, 14 Nov 2022 03:09:41 +0000 Subject: [PATCH] * Fix bug. --- module/build/model.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/module/build/model.php b/module/build/model.php index 2ff01927dd..6a49cfb637 100644 --- a/module/build/model.php +++ b/module/build/model.php @@ -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)