* [task#149744,done,0.2h] fix bug.

This commit is contained in:
sunguangming
2025-09-15 08:05:29 +00:00
parent c56bca9261
commit a747ee2aea
+5 -4
View File
@@ -11368,15 +11368,16 @@ class upgradeModel extends model
{
foreach($workflowGroups as $workflowGroup)
{
if($workflowGroup->projectModel == 'kanban') $workflowGroup->projectModel = 'scrum_kanban';
if(!empty($deliverableList[$workflowGroup->id][$oldDeliverable->id])) continue;
if(strpos($model, "{$workflowGroup->projectType}_{$workflowGroup->projectModel}") === false) continue;
if(empty($otherActivity[$workflowGroup->id])) $otherActivity[$workflowGroup->id] = $this->createOtherActivity($projectModules[$workflowGroup->id], $workflowGroup->id);
if(empty($otherActivity[$workflowGroup->id]) && isset($projectModules[$workflowGroup->id])) $otherActivity[$workflowGroup->id] = $this->createOtherActivity($projectModules[$workflowGroup->id], $workflowGroup->id);
$deliverableFile = $fileList[$oldDeliverable->id]; // 原交付物只会上传一个附件。
$deliverable->workflowGroup = $workflowGroup->id;
$deliverable->desc = $oldDeliverable->desc;
$deliverable->module = $otherModules[$workflowGroup->id];
$deliverable->activity = $otherActivity[$workflowGroup->id];
$deliverable->module = isset($otherModules[$workflowGroup->id]) ? $otherModules[$workflowGroup->id] : '0';
$deliverable->activity = isset($otherActivity[$workflowGroup->id]) ? $otherActivity[$workflowGroup->id] : '0';
$deliverable->template = $deliverableFile ? '{"new_0":{"name":"' . $deliverableFile->title . '","doc":"","fileID":"' . $deliverableFile->id . '"}}' : '[]';
$deliverable->createdBy = $oldDeliverable->createdBy;
$deliverable->createdDate = !empty($oldDeliverable->createdDate) ? $oldDeliverable->createdDate : null;
@@ -11431,7 +11432,7 @@ class upgradeModel extends model
}
/* 按照交付物配置生成交付物检查规则。 */
if(in_array($deliverableStage->stage, array('short', 'long', 'ops', 'kanban')))
if(in_array($deliverableStage->stage, array('short', 'long', 'ops')))
{
/* 将原来不同类型的迭代合并成一个迭代。 */
$deliverableStage->stage = 'sprint';