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)); } } }