From 8c9ce0238f89624fa57eea6a975e7685c3c7c083 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Wed, 8 Feb 2023 15:43:25 +0800 Subject: [PATCH] * Filter out itself and it's children. --- module/programplan/model.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/module/programplan/model.php b/module/programplan/model.php index eb3e863f00..a8bc894f5f 100755 --- a/module/programplan/model.php +++ b/module/programplan/model.php @@ -1395,13 +1395,11 @@ class programplanModel extends model ->where('t1.product')->eq($productID) ->andWhere('t2.project')->eq($executionID) ->andWhere('t2.deleted')->eq(0) + ->andWhere('t2.path')->notlike("%,$planID,%") ->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->sprints)->fi() ->orderBy('t2.id desc') ->fetchPairs(); - /* Remove the currently edited stage. */ - if(isset($parentStage[$planID])) unset($parentStage[$planID]); - $plan = $this->getByID($planID); foreach($parentStage as $key => $stage) {