* Finish task #83956.

This commit is contained in:
hufangzhou
2023-02-08 15:04:18 +08:00
parent 4436a912aa
commit 3986779df3
4 changed files with 29 additions and 1 deletions
+15
View File
@@ -1498,6 +1498,21 @@ class programplanModel extends model
return $subStageList ? false : true;
}
/**
* Change whether it is the top stage.
*
* @param int $planID
* @access public
* @return bool
*/
public function checkTopStage($planID)
{
$parentID = $this->dao->select('parent')->from(TABLE_EXECUTION)->where('id')->eq($planID)->fetch('parent');
$parentType = $this->dao->select('type')->from(TABLE_EXECUTION)->where('id')->eq($parentID)->fetch('type');
return $parentType == 'project';
}
/**
* Update sub-stage attribute.
*