* Filter out itself and it's children.

This commit is contained in:
hufangzhou
2023-02-08 15:43:25 +08:00
parent 6c775d69ba
commit 8c9ce0238f
+1 -3
View File
@@ -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)
{