diff --git a/module/execution/control.php b/module/execution/control.php index 960445df0e..e6703ffa34 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -971,17 +971,9 @@ class execution extends control if(empty($message)) $message = $this->lang->saveSuccess; if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $message, 'id' => $executionID)); - if($this->app->tab == 'doc') return $this->send(array('result' => 'success', 'message' => $message, 'load' => $this->createLink('doc', 'projectSpace', "objectID=$executionID"))); - if(!empty($_POST['plans'])) return $this->send(array('result' => 'success', 'message' => $message, 'load' => inlink('create', "projectID=$projectID&executionID=$executionID©ExecutionID=&planID=1&confirm=no"))); - if(!empty($projectID) and $project->model == 'kanban') - { - $link = $this->config->vision != 'lite' ? $this->createLink('project', 'index', "projectID=$projectID") : $this->createLink('project', 'execution', "status=all&projectID=$projectID"); - if($this->app->tab == 'project') return $this->send(array('result' => 'success', 'message' => $message, 'load' => $link)); - - return $this->send(array('result' => 'success', 'message' => $message, 'load' => inlink('kanban', "executionID=$executionID"))); - } - return $this->send(array('result' => 'success', 'message' => $message, 'load' => inlink('create', "projectID=$projectID&executionID=$executionID"))); + $location = $this->executionZen->getAfterCreateLocation($projectID, $executionID, $project->model); + return $this->send(array('result' => 'success', 'message' => $message, 'load' => $location)); } list($this->view->pmUsers, $this->view->poUsers, $this->view->qdUsers, $this->view->rdUsers) = $this->executionZen->setUserMoreLink(); diff --git a/module/execution/ui/tips.html.php b/module/execution/ui/tips.html.php index 49f0594f9d..0b7dda0b99 100644 --- a/module/execution/ui/tips.html.php +++ b/module/execution/ui/tips.html.php @@ -34,25 +34,25 @@ panel setClass('mt-5 mb-5'), btn ( - set::className('mr-4 tipBtn ml-1'), + set::className('mr-2 tipBtn ml-1'), $lang->execution->setTeam, set('data-url', createLink('execution', 'team', "executionID={$executionID}")), ), $execution->lifetime != 'ops' ? btn ( - set::className('mr-4 tipBtn'), + set::className('mr-2 tipBtn'), $lang->execution->linkStory, set('data-url', createLink('execution', 'linkstory', "executionID=$executionID")), ) : null, btn ( - set::className('mr-4 tipBtn'), + set::className('mr-2 tipBtn'), $lang->execution->createTask, set('data-url', createLink('task', 'create', "execution=$executionID")), ), btn ( - set::className('mr-4 tipBtn'), + set::className('mr-2 tipBtn'), $lang->execution->goback, set('data-url', createLink('execution', 'task', "executionID={$executionID}")), ), diff --git a/module/execution/zen.php b/module/execution/zen.php index 8855f0565d..96dca6c8a1 100644 --- a/module/execution/zen.php +++ b/module/execution/zen.php @@ -2083,4 +2083,18 @@ class executionZen extends execution $linkedObjects->unmodifiableBranches = $unmodifiableBranches; return $linkedObjects; } + + protected function getAfterCreateLocation(int $projectID, int $executionID, string $model = ''): string + { + if($this->app->tab == 'doc') return $this->createLink('doc', 'projectSpace', "objectID=$executionID"); + if(!empty($_POST['plans'])) return inlink('create', "projectID=$projectID&executionID=$executionID©ExecutionID=&planID=1&confirm=no"); + + if(!empty($projectID) and $model == 'kanban') + { + if($this->app->tab == 'project') return $this->config->vision != 'lite' ? $this->createLink('project', 'index', "projectID=$projectID") : $this->createLink('project', 'execution', "status=all&projectID=$projectID"); + return inlink('kanban', "executionID=$executionID"); + } + + return inlink('create', "projectID=$projectID&executionID=$executionID"); + } }