From 264a20d583d8d83f599d0af3a29f2efeaac1e71d Mon Sep 17 00:00:00 2001 From: tianshujie Date: Thu, 14 Oct 2021 10:47:07 +0800 Subject: [PATCH] * Fix bug #15516. --- module/upgrade/control.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/module/upgrade/control.php b/module/upgrade/control.php index 57ca5c038b..46e71911f4 100644 --- a/module/upgrade/control.php +++ b/module/upgrade/control.php @@ -350,17 +350,22 @@ class upgrade extends control if(dao::isError()) die(js::error(dao::getError())); /* Process merged independent projects. */ + $productIdList = array(); + if($type == 'noProject') + { + $productIdList = $this->dao->select('product')->from(TABLE_PROJECTPRODUCT)->where('project')->in($linkedSprints)->fetchPairs(); + } if($_POST['projectType'] == 'execution') { /* Use historical projects as execution upgrades. */ - $this->upgrade->processMergedData($programID, $projectList, $lineID, array(), $linkedSprints); + $this->upgrade->processMergedData($programID, $projectList, $lineID, $productIdList, $linkedSprints); } else { /* Use historical projects as project upgrades. */ foreach($linkedSprints as $sprint) { - $this->upgrade->processMergedData($programID, $projectList[$sprint], $lineID, array(), array($sprint => $sprint)); + $this->upgrade->processMergedData($programID, $projectList[$sprint], $lineID, $productIdList, array($sprint => $sprint)); } } }