* Fix build of project.

This commit is contained in:
zhujinyong
2021-03-21 17:53:43 +08:00
parent 4ebd5e6cc1
commit 4fe2ddb683
3 changed files with 10 additions and 22 deletions
+8 -19
View File
@@ -25,16 +25,6 @@ class build extends control
$this->loadModel('execution');
$this->loadModel('user');
if($this->app->openApp == 'project')
{
$model = $this->dao->select('model')->from(TABLE_PROJECT)->where('id')->eq($projectID)->fetch('model');
$this->lang->project->menu = $this->lang->menu->$model;
commonModel::setAppObjectID('project', $projectID);
$executions = $this->execution->getPairs($projectID);
$executionID = $executionID == 0 ? key($executions) : $executionID;
}
if(!empty($_POST))
{
$executionID = $this->post->execution;
@@ -48,18 +38,17 @@ class build extends control
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('build', 'view', "buildID=$buildID")));
}
$execution = $this->execution->getByID($executionID);
if($this->app->openApp == 'execution')
if($this->app->openApp == 'project')
{
/* Set session and get execution by id. */
$this->session->set('buildCreate', $this->app->getURI(true));
$this->project->setMenu($projectID);
/* Set menu. */
$executions = $this->execution->getPairs($execution->project);
$this->execution->setMenu($executions, $executionID);
commonModel::setAppObjectID('execution', $executionID);
}
elseif($this->app->openApp == 'execution')
{
$executions = $this->execution->getPairs($projectID);
$executionID = $executionID == 0 ? key($executions) : $executionID;
$this->execution->setMenu($executions, $executionID);
}
$productGroups = $this->execution->getProducts($executionID);
$productID = $productID ? $productID : key($productGroups);
+1 -1
View File
@@ -849,7 +849,7 @@ class story extends control
if($from == 'execution')
{
$executions = $this->loadModel('execution')->getPairs(0, 'all', 'nocode');
$this->execution->setMenu($execution, $param);
$this->execution->setMenu($executions, $param);
}
elseif($from == 'project')
{
+1 -2
View File
@@ -39,10 +39,9 @@ class task extends control
*/
public function create($executionID = 0, $storyID = 0, $moduleID = 0, $taskID = 0, $todoID = 0)
{
commonModel::setAppObjectID('execution', $executionID);
$executions = $this->execution->getPairs();
$executionID = $this->execution->saveState($executionID, $executions);
$this->execution->setMenu($executions, $executionID);
$this->execution->getLimitedExecution();
$limitedExecutions = !empty($_SESSION['limitedExecutions']) ? $_SESSION['limitedExecutions'] : '';