Merge branch 'sprint/hufangzhou_bug_32073' into 'master'
* Fix bug #32073. See merge request easycorp/zentaopms!6933
This commit is contained in:
@@ -5910,13 +5910,28 @@ class upgradeModel extends model
|
||||
if(empty($moduleBranchPairs)) return true;
|
||||
|
||||
$storyModulePairs = $this->dao->select('module')->from(TABLE_STORY)->where('module')->in(array_keys($moduleBranchPairs))->andWhere('branch')->eq(0)->fetchPairs();
|
||||
foreach($storyModulePairs as $moduleID) $this->dao->update(TABLE_STORY)->set('`branch`')->eq($moduleBranchPairs[$moduleID])->where('module')->eq($moduleID)->exec();
|
||||
foreach($storyModulePairs as $moduleID)
|
||||
{
|
||||
if(!isset($moduleBranchPairs[$moduleID])) continue;
|
||||
|
||||
$this->dao->update(TABLE_STORY)->set('`branch`')->eq($moduleBranchPairs[$moduleID])->where('module')->eq($moduleID)->exec();
|
||||
}
|
||||
|
||||
$bugModulePairs = $this->dao->select('module')->from(TABLE_BUG)->where('module')->in(array_keys($moduleBranchPairs))->andWhere('branch')->eq(0)->fetchPairs();
|
||||
foreach($bugModulePairs as $moduleID) $this->dao->update(TABLE_BUG)->set('`branch`')->eq($moduleBranchPairs[$moduleID])->where('module')->eq($moduleID)->exec();
|
||||
foreach($bugModulePairs as $moduleID)
|
||||
{
|
||||
if(!isset($moduleBranchPairs[$moduleID])) continue;
|
||||
|
||||
$this->dao->update(TABLE_BUG)->set('`branch`')->eq($moduleBranchPairs[$moduleID])->where('module')->eq($moduleID)->exec();
|
||||
}
|
||||
|
||||
$caseModulePairs = $this->dao->select('module')->from(TABLE_CASE)->where('module')->in(array_keys($moduleBranchPairs))->andWhere('branch')->eq(0)->fetchPairs();
|
||||
foreach($caseModulePairs as $moduleID) $this->dao->update(TABLE_CASE)->set('`branch`')->eq($moduleBranchPairs[$moduleID])->where('module')->eq($moduleID)->exec();
|
||||
foreach($caseModulePairs as $moduleID)
|
||||
{
|
||||
if(!isset($moduleBranchPairs[$moduleID])) continue;
|
||||
|
||||
$this->dao->update(TABLE_CASE)->set('`branch`')->eq($moduleBranchPairs[$moduleID])->where('module')->eq($moduleID)->exec();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user