* [bug#66903,done,0.2h] fix bug.
This commit is contained in:
@@ -167,8 +167,7 @@ $lang->upgrade->mergeExecutionTip = 'The system will automatically create projec
|
||||
$lang->upgrade->createProgramTip = 'At the same time, the system will automatically create a default project set and place all projects under the default project set.';
|
||||
$lang->upgrade->mergeManuallyTip = 'You can manually select the data merging method.';
|
||||
|
||||
$lang->upgrade->defaultGroup = 'Default';
|
||||
$lang->upgrade->qualityAssurance = 'Quality Assurance';
|
||||
$lang->upgrade->defaultGroup = 'Default';
|
||||
|
||||
include dirname(__FILE__) . '/version.php';
|
||||
|
||||
@@ -253,4 +252,4 @@ $lang->upgrade->baselineReview['accept'] = 'Project Change Accept Review';
|
||||
$lang->upgrade->classifyList = array();
|
||||
$lang->upgrade->classifyList['project'] = 'Project Management';
|
||||
$lang->upgrade->classifyList['engineering'] = 'Engineering Implementation';
|
||||
$lang->upgrade->classifyList['support'] = 'Support Process';
|
||||
$lang->upgrade->classifyList['support'] = 'Support Process';
|
||||
|
||||
@@ -167,8 +167,7 @@ $lang->upgrade->mergeExecutionTip = 'The system will automatically create projec
|
||||
$lang->upgrade->createProgramTip = 'At the same time, the system will automatically create a default project set and place all projects under the default project set.';
|
||||
$lang->upgrade->mergeManuallyTip = 'You can manually select the data merging method.';
|
||||
|
||||
$lang->upgrade->defaultGroup = 'Default';
|
||||
$lang->upgrade->qualityAssurance = 'Quality Assurance';
|
||||
$lang->upgrade->defaultGroup = 'Default';
|
||||
|
||||
include dirname(__FILE__) . '/version.php';
|
||||
|
||||
@@ -253,4 +252,4 @@ $lang->upgrade->baselineReview['accept'] = 'Project Change Accept Review';
|
||||
$lang->upgrade->classifyList = array();
|
||||
$lang->upgrade->classifyList['project'] = 'Project Management';
|
||||
$lang->upgrade->classifyList['engineering'] = 'Engineering Implementation';
|
||||
$lang->upgrade->classifyList['support'] = 'Support Process';
|
||||
$lang->upgrade->classifyList['support'] = 'Support Process';
|
||||
|
||||
@@ -167,8 +167,7 @@ $lang->upgrade->mergeExecutionTip = 'The system will automatically create projec
|
||||
$lang->upgrade->createProgramTip = 'At the same time, the system will automatically create a default project set and place all projects under the default project set.';
|
||||
$lang->upgrade->mergeManuallyTip = 'You can manually select the data merging method.';
|
||||
|
||||
$lang->upgrade->defaultGroup = 'Default';
|
||||
$lang->upgrade->qualityAssurance = 'Quality Assurance';
|
||||
$lang->upgrade->defaultGroup = 'Default';
|
||||
|
||||
include dirname(__FILE__) . '/version.php';
|
||||
|
||||
@@ -253,4 +252,4 @@ $lang->upgrade->baselineReview['accept'] = 'Project Change Accept Review';
|
||||
$lang->upgrade->classifyList = array();
|
||||
$lang->upgrade->classifyList['project'] = 'Project Management';
|
||||
$lang->upgrade->classifyList['engineering'] = 'Engineering Implementation';
|
||||
$lang->upgrade->classifyList['support'] = 'Support Process';
|
||||
$lang->upgrade->classifyList['support'] = 'Support Process';
|
||||
|
||||
@@ -167,8 +167,7 @@ $lang->upgrade->mergeExecutionTip = "系统将自动按年创建项目,将历
|
||||
$lang->upgrade->createProgramTip = "同时系统将自动创建一个默认的项目集,将所有的{$lang->projectCommon}都放在默认的项目集下。";
|
||||
$lang->upgrade->mergeManuallyTip = '可以手工选择数据归并的方式。';
|
||||
|
||||
$lang->upgrade->defaultGroup = '默认分组';
|
||||
$lang->upgrade->qualityAssurance = '质量保证';
|
||||
$lang->upgrade->defaultGroup = '默认分组';
|
||||
|
||||
include dirname(__FILE__) . '/version.php';
|
||||
|
||||
|
||||
@@ -12037,9 +12037,8 @@ class upgradeModel extends model
|
||||
else
|
||||
{
|
||||
$classifyModule = $this->upgradeTao->handleNeedCopyWorkflowGroup($group, $groupID, $classifyModule);
|
||||
$this->upgradeTao->migrateOutputToDeliverable($group);
|
||||
}
|
||||
|
||||
$this->upgradeTao->migrateOutputToDeliverable($group);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+26
-62
@@ -933,6 +933,8 @@ class upgradeTao extends upgradeModel
|
||||
$processList = $this->dao->select('id')->from(TABLE_PROCESS)->where('workflowGroup')->eq($groupID)->andWhere('deleted')->eq('0')->fetchPairs();
|
||||
$this->dao->update(TABLE_ACTIVITY)->set('workflowGroup')->eq($groupID)->where('process')->in(array_keys($processList))->exec();
|
||||
|
||||
$this->migrateOutputToDeliverable($group);
|
||||
|
||||
$classifyModule[$groupID] = $this->migrateClassifyToModule($group, $groupID);
|
||||
|
||||
return $classifyModule;
|
||||
@@ -1106,8 +1108,9 @@ class upgradeTao extends upgradeModel
|
||||
->andWhere('t1.deleted')->eq('0')
|
||||
->fetchAll('id');
|
||||
|
||||
$otherModule = $this->dao->select('id')->from(TABLE_MODULE)->where('root')->eq($group->id)->andWhere('type')->eq('deliverable')->andWhere('deleted')->eq('0')->andWhere('extra')->eq('other')->fetch('id');
|
||||
$projectIdList = $this->dao->select('id')->from(TABLE_PROJECT)->where('workflowGroup')->eq($group->id)->andWhere('deleted')->eq('0')->fetchPairs();
|
||||
if(empty($outputList)) return;
|
||||
|
||||
$otherModule = $this->dao->select('id')->from(TABLE_MODULE)->where('root')->eq($group->id)->andWhere('type')->eq('deliverable')->andWhere('deleted')->eq('0')->andWhere('extra')->eq('other')->fetch('id');
|
||||
|
||||
$deliverable = new stdclass();
|
||||
$deliverable->template = '[]';
|
||||
@@ -1117,48 +1120,7 @@ class upgradeTao extends upgradeModel
|
||||
$deliverable->builtin = 1;
|
||||
$deliverable->deleted = '1';
|
||||
|
||||
$approvalflowObject = new stdclass();
|
||||
$approvalflowObject->root = $group->id;
|
||||
$approvalflowObject->flow = 1;
|
||||
$approvalflowObject->objectType = 'deliverable';
|
||||
$approvalflowObject->relatedBy = 'system';
|
||||
$approvalflowObject->relatedDate = helper::now();
|
||||
$approvalflowObject->extra = 'review';
|
||||
|
||||
$oldAuditclList = $this->dao->select('*')->from(TABLE_AUDITCL)
|
||||
->where('objectType')->eq('zoutput')
|
||||
->andWhere('workflowGroup')->eq($group->id)
|
||||
->andWhere('objectID')->in(array_keys($outputList))
|
||||
->andWhere('deleted')->eq('0')
|
||||
->fetchGroup('objectID', 'id');
|
||||
|
||||
if(!empty($oldAuditclList))
|
||||
{
|
||||
$this->app->loadLang('reviewcl');
|
||||
$categoryList = $this->lang->reviewcl->waterfallCategoryList;
|
||||
|
||||
$item = new stdclass();
|
||||
$item->lang = $this->app->getClientLang();
|
||||
$item->module = 'reviewcl';
|
||||
$item->section = "{$group->id}CategoryList";
|
||||
$item->system = 1;
|
||||
foreach($categoryList as $key => $value)
|
||||
{
|
||||
$item->key = $key;
|
||||
$item->value = $value;
|
||||
$this->dao->insert(TABLE_LANG)->data($item)->exec();
|
||||
}
|
||||
|
||||
$item->key = 'QA';
|
||||
$item->value = $this->lang->upgrade->qualityAssurance;
|
||||
$this->dao->insert(TABLE_LANG)->data($item)->exec();
|
||||
}
|
||||
|
||||
$idMap = array();
|
||||
$reviewcl = new stdclass();
|
||||
$reviewcl->workflowGroup = $group->id;
|
||||
$reviewcl->category = 'QA';
|
||||
$reviewcl->createdDate = helper::now();
|
||||
$idMap = array();
|
||||
foreach($outputList as $output)
|
||||
{
|
||||
$deliverable->name = $output->name;
|
||||
@@ -1169,32 +1131,34 @@ class upgradeTao extends upgradeModel
|
||||
$deliverableID = $this->dao->lastInsertID();
|
||||
|
||||
$idMap[$output->id] = $deliverableID;
|
||||
|
||||
$this->dao->update(TABLE_PROGRAMOUTPUT)->set('output')->eq($deliverableID)->set('activity')->eq($output->activity)->where('id')->eq($output->id)->exec();
|
||||
|
||||
$auditclList = zget($oldAuditclList, $output->id, array());
|
||||
if(!empty($auditclList))
|
||||
{
|
||||
$approvalflowObject->objectID = $deliverableID;
|
||||
$this->dao->insert(TABLE_APPROVALFLOWOBJECT)->data($approvalflowObject)->exec();
|
||||
$approvalID = $this->dao->lastInsertID();
|
||||
|
||||
foreach($auditclList as $auditcl)
|
||||
{
|
||||
$reviewcl->title = $auditcl->title;
|
||||
$reviewcl->object = $approvalID;
|
||||
$reviewcl->createdBy = $auditcl->createdBy;
|
||||
$this->dao->insert(TABLE_REVIEWCL)->data($reviewcl)->exec();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$auditplans = $this->dao->select('id,objectID')->from(TABLE_AUDITPLAN)->where('objectType')->eq('zoutput')->andWhere('objectID')->in(array_keys($idMap))->andWhere('project')->in($projectIdList)->fetchPairs();
|
||||
$projectIdList = $this->dao->select('id')->from(TABLE_PROJECT)->where('workflowGroup')->eq($group->id)->fetchPairs();
|
||||
$auditplans = $this->dao->select('id,objectID')->from(TABLE_AUDITPLAN)
|
||||
->where('objectType')->eq('zoutput')
|
||||
->andWhere('objectID')->in(array_keys($idMap))
|
||||
->andWhere('project')->in($projectIdList)
|
||||
->fetchPairs();
|
||||
|
||||
foreach($auditplans as $id => $objectID)
|
||||
{
|
||||
$newID = $idMap[$objectID];
|
||||
$this->dao->update(TABLE_AUDITPLAN)->set('objectID')->eq($newID)->where('id')->eq($id)->exec();
|
||||
}
|
||||
|
||||
$auditcls = $this->dao->select('id, objectID')->from(TABLE_AUDITCL)
|
||||
->where('objectType')->eq('zoutput')
|
||||
->andWhere('workflowGroup')->eq($group->id)
|
||||
->andWhere('objectID')->in(array_keys($outputList))
|
||||
->andWhere('deleted')->eq('0')
|
||||
->fetchPairs();
|
||||
|
||||
foreach($auditcls as $id => $objectID)
|
||||
{
|
||||
$newID = $idMap[$objectID];
|
||||
$this->dao->update(TABLE_AUDITCL)->set('objectID')->eq($newID)->where('id')->eq($id)->exec();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user