From a4c38a8883b94299e9de21202258df7fe2a4cd28 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Mon, 25 Nov 2024 09:00:42 +0800 Subject: [PATCH] * [bug#57365,done,0.3h] locate to project::tips after create stages. --- module/programplan/control.php | 4 +++- module/project/control.php | 9 +++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/module/programplan/control.php b/module/programplan/control.php index c336e8162a..94465bb631 100644 --- a/module/programplan/control.php +++ b/module/programplan/control.php @@ -83,10 +83,11 @@ class programplan extends control * @param int $productID * @param int $planID * @param string $executionType + * @param string $from * @access public * @return void */ - public function create(int $projectID = 0, int $productID = 0, int $planID = 0, string $executionType = 'stage') + public function create(int $projectID = 0, int $productID = 0, int $planID = 0, string $executionType = 'stage', string $from = '') { $this->loadModel('review'); $this->productID = $this->commonAction($projectID, $productID); @@ -104,6 +105,7 @@ class programplan extends control } $locate = $this->session->projectPlanList ? $this->session->projectPlanList : $this->createLink('project', 'execution', "status=all&projectID={$projectID}&orderBy=order_asc&productID={$productID}"); + if($from == 'projectCreate') $locate = $this->createLink('project', 'create', "model=&programID=0©ProjectID=0&extra=showTips=1,project=$projectID"); $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locate)); } diff --git a/module/project/control.php b/module/project/control.php index 1631f4755a..6a5660d867 100755 --- a/module/project/control.php +++ b/module/project/control.php @@ -472,6 +472,15 @@ class project extends control if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $projectID)); + if(in_array($model, array('waterfall', 'waterfallplus', 'ipd'))) + { + $productID = $this->loadModel('product')->getProductIDByProject($projectID, true); + $session = $this->createLink('programplan', 'browse', "projectID=$projectID&productID=$productID&type=lists", '', false, $projectID); + if(in_array($this->config->edition, array('max', 'ipd'))) $session = $this->createLink('project', 'execution', "status=undone&projectID=$projectID", '', false); + $this->session->set('projectPlanList', $session, 'project'); + return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('programplan', 'create', "projectID=$projectID&productID=0&planID=0&executionType=stage&from=projectCreate", '', false, $projectID))); + } + return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('create', "model=$model&programID=$programID©ProjectID=$projectID&extra=showTips=1,project=$projectID"))); }