Fix some problem.
This commit is contained in:
@@ -65,20 +65,20 @@ class commonModel extends model
|
||||
if($thisModule == 'execution')
|
||||
{
|
||||
$executionID = $objectID;
|
||||
$execution = $this->dao->select('*')->from(TABLE_EXECUTION)->where('id')->eq($executionID)->fetch();
|
||||
$execution = $this->dao->select('id, project')->from(TABLE_EXECUTION)->where('id')->eq($executionID)->fetch();
|
||||
$project = $this->syncProjectStatus($execution);
|
||||
$this->syncProgramStatus($project);
|
||||
}
|
||||
if($thisModule == 'project')
|
||||
{
|
||||
$projectID = $objectID;
|
||||
$project = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($projectID)->fetch();
|
||||
$project = $this->dao->select('id, parent, path')->from(TABLE_PROJECT)->where('id')->eq($projectID)->fetch();
|
||||
$this->syncProgramStatus($project);
|
||||
}
|
||||
if($thisModule == 'program')
|
||||
{
|
||||
$programID = $objectID;
|
||||
$program = $this->dao->select('*')->from(TABLE_PROGRAM)->where('id')->eq($programID)->fetch();
|
||||
$program = $this->dao->select('id, parent, path')->from(TABLE_PROGRAM)->where('id')->eq($programID)->fetch();
|
||||
$this->syncProgramStatus($program);
|
||||
}
|
||||
}
|
||||
@@ -103,9 +103,9 @@ class commonModel extends model
|
||||
->orderBy('id_desc')
|
||||
->fetchPairs();
|
||||
|
||||
$this->dao->update(TABLE_PROGRAM)->set('status')->eq('doing')->where('id')->in($waitList)->exec();
|
||||
foreach($waitList as $programID)
|
||||
{
|
||||
$this->dao->update(TABLE_PROGRAM)->set('status')->eq('doing')->where('id')->eq($programID)->exec();
|
||||
$this->loadModel('action')->create('program', $programID, 'syncprogram');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1576,6 +1576,7 @@ class execution extends control
|
||||
$actionID = $this->loadModel('action')->create($this->objectType, $executionID, 'Edited');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
|
||||
$syncExecution = '';
|
||||
foreach($changes as $changeField)
|
||||
{
|
||||
if($changeField['field'] == 'status' && $changeField['old'] =='wait' && $changeField['new'] =='doing')
|
||||
|
||||
@@ -578,12 +578,12 @@ class executionModel extends model
|
||||
$this->loadModel('user');
|
||||
|
||||
$executions = array();
|
||||
$allChanges = array();
|
||||
$data = fixer::input('post')->get();
|
||||
$allChanges = array();
|
||||
$data = fixer::input('post')->get();
|
||||
$oldExecutions = $this->getByIdList($this->post->executionIDList);
|
||||
$nameList = array();
|
||||
$codeList = array();
|
||||
$projectModel = '';
|
||||
$nameList = array();
|
||||
$codeList = array();
|
||||
$projectModel = 'scrum';
|
||||
|
||||
/* Replace required language. */
|
||||
if($this->app->tab == 'project')
|
||||
|
||||
@@ -467,19 +467,19 @@ class task extends control
|
||||
if(!empty($allChanges))
|
||||
{
|
||||
/* updateStatus is a description of whether to update the responsibility performance*/
|
||||
$updateStatus = false;
|
||||
$waitTaskID = false;
|
||||
foreach($allChanges as $taskID => $changes)
|
||||
{
|
||||
if(empty($changes)) continue;
|
||||
|
||||
/* Determine whether the status of a task has been changed, if the status of a task has been changed, set $updateStatus to taskID*/
|
||||
if($updateStatus == false)
|
||||
if($waitTaskID == false)
|
||||
{
|
||||
foreach($changes as $changeField)
|
||||
{
|
||||
if($changeField['field'] == 'status' && $changeField['new'] == 'doing')
|
||||
{
|
||||
$updateStatus = $taskID;
|
||||
$waitTaskID = $taskID;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -501,7 +501,7 @@ class task extends control
|
||||
}
|
||||
}
|
||||
}
|
||||
if($updateStatus !== false) $this->loadModel('common')->syncPPEStatus($updateStatus);
|
||||
if($waitTaskID !== false) $this->loadModel('common')->syncPPEStatus($waitTaskID);
|
||||
}
|
||||
}
|
||||
$this->loadModel('score')->create('ajax', 'batchOther');
|
||||
|
||||
Reference in New Issue
Block a user