Merge branch '15.0.beta3' of https://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3

This commit is contained in:
wangyidong
2021-04-28 11:10:11 +08:00
2 changed files with 20 additions and 2 deletions
+1 -1
View File
@@ -748,7 +748,7 @@ class projectModel extends model
$lib->name = $this->lang->doclib->main['project'];
$lib->type = 'project';
$lib->main = '1';
$lib->acl = $project->acl;
$lib->acl = $project->acl != 'program' ? $project->acl : 'custom';
$this->dao->insert(TABLE_DOCLIB)->data($lib)->exec();
$this->updateProducts($projectID);
+19 -1
View File
@@ -647,6 +647,10 @@ class upgradeModel extends model
$this->saveLogs('Execute 15_0_rc2');
$this->execSQL($this->getUpgradeFile('15.0.rc2'));
$this->appendExec('15_0_rc2');
case '15_0_rc3':
$this->saveLogs('Execute 15_0_rc3');
$this->updateLibType();
$this->appendExec('15_0_rc3');
}
$this->deletePatch();
@@ -4304,7 +4308,7 @@ class upgradeModel extends model
$lib->name = $this->lang->doclib->main['project'];
$lib->type = 'project';
$lib->main = '1';
$lib->acl = $project->acl;
$lib->acl = $project->acl != 'program' ? $project->acl : 'custom';
$this->dao->insert(TABLE_DOCLIB)->data($lib)->exec();
$this->loadModel('action')->create('project', $projectID, 'openedbysystem');
@@ -4863,4 +4867,18 @@ class upgradeModel extends model
return true;
}
/**
* Update execution main doclib type.
*
* @access public
* @return bool
*/
public function updateLibType()
{
$executionList = $this->dao->select('id')->from(TABLE_EXECUTION)->where('type')->eq('sprint')->fetchAll('id');
$this->dao->update(TABLE_DOCLIB)->set('type')->eq('execution')->where('execution')->in(array_keys($executionList))->exec();
return true;
}
}