diff --git a/module/execution/control.php b/module/execution/control.php index b4ce708ace..d8dd94f4a2 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1203,7 +1203,7 @@ class execution extends control } elseif($this->app->openApp == 'execution') { - $executionID = key($this->executions); + if($this->config->systemMode == 'new') $executionID = key($this->executions); $this->execution->setMenu($executionID); } @@ -1297,7 +1297,7 @@ class execution extends control } } - $this->view->title = $this->lang->execution->create; + $this->view->title = (($this->app->openApp == 'execution') and ($this->config->systemMode == 'new')) ? $this->lang->execution->createExec : $this->lang->execution->create; $this->view->position[] = $this->view->title; $this->view->executions = array('' => '') + $this->execution->getList(); $this->view->groups = $this->loadModel('group')->getPairs(); diff --git a/module/execution/model.php b/module/execution/model.php index 4ab71f1d9f..3e767a1d51 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -280,15 +280,19 @@ class executionModel extends model { $this->lang->execution->team = $this->lang->execution->teamname; - if(empty($_POST['project'])) + if($this->config->systemMode == 'new') { - dao::$errors['message'][] = $this->lang->execution->projectNotEmpty; - return false; - } + if(empty($_POST['project'])) + { + dao::$errors['message'][] = $this->lang->execution->projectNotEmpty; + return false; + } - /* Determine whether to add a sprint or a stage according to the model of the execution. */ - $project = $this->getByID($_POST['project']); - $sprintType = $this->config->systemMode == 'new' ? zget($this->config->execution->modelList, $project->model, '') : 'sprint'; + /* Determine whether to add a sprint or a stage according to the model of the execution. */ + $project = $this->getByID($_POST['project']); + $sprintType = zget($this->config->execution->modelList, $project->model, ''); + } + if($this->config->systemMode == 'classic') $sprintType = 'sprint'; /* If the execution model is a stage, determine whether the product is linked. */ if($sprintType == 'stage' and empty($this->post->products[0])) @@ -346,7 +350,7 @@ class executionModel extends model $this->file->updateObjectID($this->post->uid, $executionID, 'execution'); /* Update the path. */ - $this->setTreePath($executionID); + if($this->config->systemMode == 'new') $this->setTreePath($executionID); /* Copy team of execution. */ if($copyExecutionID != '') @@ -378,7 +382,7 @@ class executionModel extends model $member->hours = $this->config->execution->defaultWorkhours; $this->dao->insert(TABLE_TEAM)->data($member)->exec(); - $this->addProjectMembers($sprint->project, array($member)); + if($this->config->systemMode == 'new') $this->addProjectMembers($sprint->project, array($member)); } /* Create doc lib. */ diff --git a/module/execution/view/all.html.php b/module/execution/view/all.html.php index 46971555d6..5440ed85da 100644 --- a/module/execution/view/all.html.php +++ b/module/execution/view/all.html.php @@ -42,7 +42,7 @@