Merge branch 'sprint/239_liuruogu_bug' into 'zentaopms_239'

* Fix bug for hidden plan.

See merge request easycorp/zentaopms!5519
This commit is contained in:
刘刚
2022-09-23 06:32:13 +00:00
+7 -4
View File
@@ -1331,14 +1331,17 @@ class story extends control
$this->view->hiddenURS = false;
if(!empty($product->shadow))
{
$projectID = $this->dao->select('project')->from(TABLE_PROJECTPRODUCT)->where('product')->eq($product->id)->fetch('project');
$project = $this->dao->findById($projectID)->from(TABLE_PROJECT)->fetch();
$projectModel = $this->dao->select('t2.model')->from(TABLE_PROJECTPRODUCT)->alias('t1')
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
->where('t1.product')->eq($product->id)
->andWhere('t2.type')->eq('project')
->fetch('model');
if($project->model === 'waterfall')
if($projectModel === 'waterfall')
{
$this->view->hiddenPlan = true;
}
elseif($project->model === 'kanban')
elseif($projectModel === 'kanban')
{
$this->view->hiddenPlan = true;
$this->view->hiddenURS = true;