From ce50aeecf94eedf950d4b50b336e462979eafcf7 Mon Sep 17 00:00:00 2001 From: hufangzhou <746775970@qq.com> Date: Tue, 19 Jan 2021 13:21:12 +0800 Subject: [PATCH] * Adjust the code. --- module/project/model.php | 43 ---------------------------------------- 1 file changed, 43 deletions(-) diff --git a/module/project/model.php b/module/project/model.php index e85bffc13d..e4464fcaa3 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -1775,29 +1775,6 @@ class projectModel extends model $existedProducts[$productID] = true; } - /* Link the stories of the plans to the project. */ - foreach($plans as $productID => $planID) - { - $planStories = $planProducts = array(); - $planStory = $this->loadModel('story')->getPlanStories($planID); - $count = 0; - if(!empty($planStory)) - { - foreach($planStory as $id => $story) - { - if($story->status == 'draft') - { - $count++; - unset($planStory[$id]); - continue; - } - $planProducts[$story->id] = $story->product; - } - $planStories = array_keys($planStory); - $this->linkStory($projectID, $planStories, $planProducts); - } - } - /* Delete the execution linked products that is not linked with the project. */ $executions = $this->dao->select('id')->from(TABLE_PROJECT)->where('project')->eq((int)$projectID)->fetchPairs('id'); $this->dao->delete()->from(TABLE_PROJECTPRODUCT)->where('project')->in($executions)->andWhere('product')->notin($products)->exec(); @@ -2103,26 +2080,6 @@ class projectModel extends model } } - /** - * project link plan. - * - * @param int $projectID - * @param int $planID - * @access public - * @return void - */ -// public function linkPlan($projectID, $planID) -// { -// $plan = $this->dao->select('*')->from(TABLE_PRODUCTPLAN)->where('id')->eq($planID)->fetch(); -// -// $data = new stdclass(); -// $data->project = $projectID; -// $data->product = $plan->product; -// $data->branch = $plan->branch; -// $data->plan = $plan->id; -// $this->dao->replace(TABLE_PROJECTPRODUCT)->data($data)->exec(); -// } - /** * Link story. *