From ca95ff0b0d1cc1c0bd9bd59a573d9366ce88ca9a Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Thu, 14 Dec 2023 10:48:03 +0800 Subject: [PATCH] * Adjust devops page locate for kanban. --- module/execution/model.php | 2 +- module/mr/control.php | 2 ++ module/repo/control.php | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/module/execution/model.php b/module/execution/model.php index 636d794fe3..36092ca218 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -133,7 +133,7 @@ class executionModel extends model $this->session->set('execution', $executionID, $this->app->tab); common::setMenuVars('execution', $executionID); - if($this->app->getModuleName() == 'repo' || $this->app->getModuleName() == 'mr') + if($execution->type != 'kanban' && $this->app->getModuleName() == 'repo' || $this->app->getModuleName() == 'mr') { $repoPairs = $this->loadModel('repo')->getRepoPairs('execution', $executionID); diff --git a/module/mr/control.php b/module/mr/control.php index e299585bf3..740af8d0bc 100644 --- a/module/mr/control.php +++ b/module/mr/control.php @@ -55,6 +55,8 @@ class mr extends control { $this->session->set('execution', $objectID); $execution = $this->loadModel('execution')->getByID($objectID); + if($execution && $execution->type === 'kanban') return $this->locate($this->createLink('execution', 'kanban', "executionID=$objectID")); + $features = $this->execution->getExecutionFeatures($execution); if(!$features['devops']) return $this->locate($this->createLink('execution', 'task', "objectID=$objectID")); diff --git a/module/repo/control.php b/module/repo/control.php index 54d03ad6ac..0d712649e2 100644 --- a/module/repo/control.php +++ b/module/repo/control.php @@ -59,6 +59,8 @@ class repo extends control elseif($tab == 'execution') { $execution = $this->loadModel('execution')->getByID($objectID); + if($execution && $execution->type === 'kanban') return $this->locate($this->createLink('execution', 'kanban', "executionID=$objectID")); + $features = $this->execution->getExecutionFeatures($execution); if(!$features['devops']) return print($this->locate($this->createLink('execution', 'task', "executionID=$objectID")));