From a747ee2aeade86b357f972b2c0248f9436d1cd42 Mon Sep 17 00:00:00 2001 From: sunguangming Date: Mon, 15 Sep 2025 06:55:42 +0000 Subject: [PATCH] * [task#149744,done,0.2h] fix bug. --- module/upgrade/model.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/module/upgrade/model.php b/module/upgrade/model.php index 0e87825eee..ad08365e93 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -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';