* Fix bug #13973.
This commit is contained in:
@@ -1758,7 +1758,7 @@ class execution extends control
|
||||
*/
|
||||
public function view($executionID)
|
||||
{
|
||||
$executionID = (int)$executionID;
|
||||
$executionID = $this->execution->saveState((int)$executionID, $this->executions);
|
||||
$execution = $this->execution->getById($executionID, true);
|
||||
if(empty($execution) || strpos('stage,sprint', $execution->type) === false) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
|
||||
|
||||
@@ -558,7 +558,7 @@ class project extends control
|
||||
*/
|
||||
public function view($projectID = 0)
|
||||
{
|
||||
$projectID = (int)$projectID;
|
||||
$projectID = $this->project->saveState((int)$projectID, $this->project->getPairsByProgram());
|
||||
$project = $this->project->getById($projectID);
|
||||
if(empty($project) || strpos('scrum,waterfall', $project->model) === false) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ class testcase extends control
|
||||
/* Set menu, save session. */
|
||||
if($this->app->openApp == 'project')
|
||||
{
|
||||
$this->products = array('0' => $this->lang->product->all) + $this->loadModel('project')->getProducts($this->session->project, false);
|
||||
$this->products = array('0' => $this->lang->product->all) + $this->loadModel('project')->getProducts($projectID, false);
|
||||
$this->loadModel('project')->setMenu($projectID);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -4508,7 +4508,6 @@ class upgradeModel extends model
|
||||
if(!$projectID) die(js::alert($this->lang->upgrade->projectEmpty));
|
||||
|
||||
$this->dao->update(TABLE_BUG)->set('project')->eq($projectID)->where('product')->in($productIdList)->exec();
|
||||
$this->dao->update(TABLE_CASE)->set('project')->eq($projectID)->where('product')->in($productIdList)->exec();
|
||||
$this->dao->update(TABLE_TESTREPORT)->set('project')->eq($projectID)->where('product')->in($productIdList)->exec();
|
||||
$this->dao->update(TABLE_TESTSUITE)->set('project')->eq($projectID)->where('product')->in($productIdList)->exec();
|
||||
$this->dao->update(TABLE_BUILD)->set('project')->eq($projectID)->where('product')->in($productIdList)->exec();
|
||||
@@ -4519,6 +4518,7 @@ class upgradeModel extends model
|
||||
$this->dao->update(TABLE_BUG)->set('project')->eq($projectID)->where('execution')->in($sprintIdList)->andWhere('project')->eq(0)->exec();
|
||||
$this->dao->update(TABLE_DOC)->set('project')->eq($projectID)->set('type')->eq('execution')->where("lib IN(SELECT id from " . TABLE_DOCLIB . " WHERE type = 'project' and execution " . helper::dbIN($sprintIdList) . ')')->exec();
|
||||
$this->dao->update(TABLE_DOCLIB)->set('project')->eq($projectID)->where('type')->eq('execution')->andWhere('execution')->in($sprintIdList)->exec();
|
||||
$this->dao->update(TABLE_TESTTASK)->set('project')->eq($projectID)->where('execution')->in($sprintIdList)->exec();
|
||||
|
||||
/* Put sprint stories into project story mdoule. */
|
||||
$sprintStories = $this->dao->select('*')->from(TABLE_PROJECTSTORY)
|
||||
@@ -4539,9 +4539,18 @@ class upgradeModel extends model
|
||||
->where('t1.execution')->in($sprintIdList)
|
||||
->fetchAll();
|
||||
|
||||
$sprintCases += $this->dao->select('`case`,product,project,count,version')->from(TABLE_PROJECTCASE)->where('project')->in($sprintIdList)->fetchAll();
|
||||
|
||||
foreach($sprintCases as $projectCase)
|
||||
{
|
||||
$projectCase->order = $projectCase * 5;
|
||||
$caes = new stdClass();
|
||||
$case->case = $projectCase->case;
|
||||
$case->order = $projectCase->case * 5;
|
||||
$case->project = $projectCase->project;
|
||||
$case->product = $projectCase->product;
|
||||
$this->dao->replace(TABLE_PROJECTCASE)->data($case)->exec();
|
||||
|
||||
$projectCase->order = $projectCase->case * 5;
|
||||
$projectCase->project = $projectID;
|
||||
$this->dao->replace(TABLE_PROJECTCASE)->data($projectCase)->exec();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user