- [bug#47616,done,1h] fix bug.

This commit is contained in:
zhouxin
2024-06-14 05:12:08 +00:00
committed by 宋辰轩
parent 6f30610a0f
commit a9ec2f7c57
-9
View File
@@ -365,8 +365,6 @@ class programplanModel extends model
}
}
/* If child plans has milestone, update parent plan set milestone eq 0 . */
if($parentID and $milestone) $this->dao->update(TABLE_PROJECT)->set('milestone')->eq(0)->where('id')->eq($parentID)->exec();
if($project && $project->model == 'ipd') $this->dao->update(TABLE_PROJECT)->set('parallel')->eq($parallel)->where('id')->eq($projectID)->exec();
if($updateUserViewIdList) $this->loadModel('user')->updateUserView($updateUserViewIdList, 'sprint');
if($enabledPoints) $this->programplanTao->updatePoint($projectID, $enabledPoints);
@@ -425,13 +423,6 @@ class programplanModel extends model
public function update(int $planID = 0, int $projectID = 0, object|null $plan = null): bool
{
if(empty($plan)) return false;
if($plan->parent > 0)
{
/* 如果子阶段有里程碑,那么父阶段的更新为0。 */
/* If child plan has milestone, update parent plan set milestone eq 0 . */
$parentStage = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($plan->parent)->andWhere('type')->eq('stage')->fetch();
if($plan->milestone && $parentStage->milestone) $this->dao->update(TABLE_PROJECT)->set('milestone')->eq(0)->where('id')->eq($plan->parent)->exec();
}
$changes = $this->programplanTao->updateRow($planID, $projectID, $plan);
if(dao::isError()) return false;