From 2c0ff00c07d2fe1f93eb24b4d4fca604f45a97a4 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Wed, 10 Apr 2024 13:49:22 +0800 Subject: [PATCH] * Fix bug #47668. --- module/execution/model.php | 6 ++++++ module/project/model.php | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/module/execution/model.php b/module/execution/model.php index 8115b6c421..41492cc04e 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -5993,6 +5993,12 @@ class executionModel extends model $_POST['hasProduct'] = $project->hasProduct; if($project->code) $_POST['code'] = $project->code; + if($project->model == 'kanban') + { + $teamMembers = $this->dao->select('*')->from(TABLE_TEAM)->where('type')->eq('project')->andWhere('root')->eq($projectID)->fetchPairs('account', 'account'); + $_POST['teamMembers'] = array_values($teamMembers); + } + $projectProducts = $this->dao->select('*')->from(TABLE_PROJECTPRODUCT)->where('project')->eq($projectID)->fetchAll(); foreach($projectProducts as $projectProduct) { diff --git a/module/project/model.php b/module/project/model.php index 0a05f660b6..4dcea30d6f 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -1518,7 +1518,7 @@ class projectModel extends model if($project->acl != 'open') $this->loadModel('user')->updateUserView($projectID, 'project'); - if(empty($project->multiple) and $project->model != 'waterfall' and $project->model != 'waterfallplus') $this->loadModel('execution')->createDefaultSprint($projectID); + if(empty($project->multiple) && !in_array($project->model, array('waterfall', 'waterfallplus'))) $this->loadModel('execution')->createDefaultSprint($projectID); return $projectID; } @@ -1711,7 +1711,7 @@ class projectModel extends model if($project->status == 'closed') $this->product->close($productID); } - if(empty($oldProject->multiple) and $oldProject->model != 'waterfall') $this->loadModel('execution')->syncNoMultipleSprint($projectID); + if(empty($project->multiple) && !in_array($oldProject->model, array('waterfall', 'waterfallplus'))) $this->loadModel('execution')->syncNoMultipleSprint($projectID); return common::createChanges($oldProject, $project); }