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) {