This commit is contained in:
wangyuting2
2022-09-21 05:50:44 +00:00
parent ae887f4a2c
commit 75771bafd2
2 changed files with 19 additions and 0 deletions
+13
View File
@@ -684,6 +684,19 @@ class upgrade extends control
if($mergeMode == 'project') $this->upgrade->upgradeInProjectMode($programID);
if($mergeMode == 'execution') $this->upgrade->upgradeInExecutionMode($programID);
if(dao::isError()) return print(js::error(dao::getError()));
$this->upgrade->computeObjectMembers();
$this->upgrade->initUserView();
$this->upgrade->setDefaultPriv();
$this->dao->update(TABLE_CONFIG)->set('value')->eq('0_0')->where('`key`')->eq('productProject')->exec();
$hourPoint = $this->loadModel('setting')->getItem('owner=system&module=custom&key=hourPoint');
if(empty($hourPoint)) $this->setting->setItem('system.custom.hourPoint', 0);
$sprints = $this->dao->select('id')->from(TABLE_PROJECT)->where('type')->eq('sprint')->fetchAll('id');
$this->dao->update(TABLE_ACTION)->set('objectType')->eq('execution')->where('objectID')->in(array_keys($sprints))->andWhere('objectType')->eq('project')->exec();
if(dao::isError()) return print(js::error(dao::getError()));
$this->locate(inlink('afterExec', "fromVersion=$fromVersion"));
}
+6
View File
@@ -7644,6 +7644,9 @@ class upgradeModel extends model
$this->fixProjectPath($programID);
$productIdList = $this->dao->select('id')->from(TABLE_PRODUCT)->where('program')->eq('0')->fetchPairs();
$this->computeProductAcl($productIdList, $programID, 0);
if(dao::isError()) return false;
return true;
}
@@ -7716,6 +7719,9 @@ class upgradeModel extends model
$this->fixProjectPath($programID);
$productIdList = $this->dao->select('id')->from(TABLE_PRODUCT)->where('program')->eq('0')->fetchPairs();
$this->computeProductAcl($productIdList, $programID, 0);
if(dao::isError()) return false;
return true;
}