* make an exception for waterfall model project.

This commit is contained in:
Chenjianyu
2023-08-07 17:20:02 +08:00
parent 1c6255ee4d
commit efb17b2f05
+14 -3
View File
@@ -963,9 +963,20 @@ class aiModel extends model
}
elseif($module == 'project')
{
$objectId = $this->dao->select('max(id) as maxId')->from(TABLE_PROJECT)
->where('id')->in($this->app->user->view->projects)
->fetch('maxId');
/* programplan/create only exist in the waterfall model project. */
if(strpos($prompt->targetForm, 'programplan/create'))
{
$objectId = $this->dao->select('max(id) as maxId')->from(TABLE_PROJECT)
->where('id')->in($this->app->user->view->projects)
->andWhere('model')->eq('waterfall')
->fetch('maxId');
}
else
{
$objectId = $this->dao->select('max(id) as maxId')->from(TABLE_PROJECT)
->where('id')->in($this->app->user->view->projects)
->fetch('maxId');
}
}
elseif($module == 'story')
{