From d3e105f5994e42e477eb1421e0949e42bac80b9f Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 21 Jan 2025 13:37:19 +0800 Subject: [PATCH] * [bug#59391,done,1h] fix the execution unlink plan when edit a project. --- module/project/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/project/model.php b/module/project/model.php index a0a23d36ab..60a16a1935 100755 --- a/module/project/model.php +++ b/module/project/model.php @@ -1506,7 +1506,7 @@ class projectModel extends model $this->updatePlans($projectID, (array)$this->post->plans); // 更新关联的计划列表。 if($oldProject->hasProduct > 0) $this->updateProducts($projectID, (array)$this->post->products, $postProductData); // 更新关联的产品列表。 $this->updateTeamMembers($project, $oldProject, zget($_POST, 'teamMembers', array())); // 更新关联的用户信息。 - if(!empty((array)$postProductData)) $this->updateProductStage($projectID, (string)$oldProject->stageBy, $postProductData); // 更新关联的所有产品的阶段。 + if(!empty((array)$postProductData) && in_array($oldProject->model, array('waterfall', 'waterfallplus'))) $this->updateProductStage($projectID, (string)$oldProject->stageBy, $postProductData); // 更新关联的所有产品的阶段。 $this->file->updateObjectID((string)$this->post->uid, $projectID, 'project'); // 通过uid更新文件id。 @@ -1517,7 +1517,7 @@ class projectModel extends model $unlinkType = array_diff(explode(',', $oldProject->storyType), explode(',', $project->storyType)); if($unlinkType) $this->unlinkStoryByType($projectID, $unlinkType); } - if(empty($oldProject->multiple) and $oldProject->model != 'waterfall') $this->loadModel('execution')->syncNoMultipleSprint($projectID); // 无迭代的非瀑布项目需要更新。 + if(empty($oldProject->multiple) and !in_array($oldProject->model, array('waterfall', 'waterfallplus'))) $this->loadModel('execution')->syncNoMultipleSprint($projectID); // 无迭代的非瀑布项目需要更新。 if(dao::isError()) return false; return common::createChanges($oldProject, $project);