* fix bug for get product and project.
This commit is contained in:
@@ -161,7 +161,7 @@ class actionModel extends model
|
||||
$record = $this->dao->select($fields)->from($this->config->objectTables[$objectType])->where('id')->eq($objectID)->fetch();
|
||||
|
||||
/* Process story, release and task. */
|
||||
if($objectType == 'story') $record->project = $this->dao->select('project')->from(TABLE_PROJECTSTORY)->where('story')->eq($objectID)->fetch('project');
|
||||
if($objectType == 'story') $record->project = $this->dao->select('project')->from(TABLE_PROJECTSTORY)->where('story')->eq($objectID)->orderBy('project_desc')->limit(1)->fetch('project');
|
||||
if($objectType == 'release') $record->project = $this->dao->select('project')->from(TABLE_BUILD)->where('id')->eq($record->build)->fetch('project');
|
||||
if($objectType == 'task')
|
||||
{
|
||||
|
||||
@@ -1656,9 +1656,9 @@ class projectModel extends model
|
||||
$this->loadModel('action')->create('story', $storyID, 'unlinkedfromproject', '', $projectID);
|
||||
|
||||
$tasks = $this->dao->select('id')->from(TABLE_TASK)->where('story')->eq($storyID)->andWhere('project')->eq($projectID)->andWhere('status')->in('wait,doing')->fetchPairs('id');
|
||||
$this->dao->update(TABLE_TASK)->set('status')->eq('cancel')->where('id')->in($tasks)->exec();
|
||||
foreach($tasks as $taskID)
|
||||
{
|
||||
if(empty($taskID)) continue;
|
||||
$changes = $this->loadModel('task')->cancel($taskID);
|
||||
$actionID = $this->action->create('task', $taskID, 'Canceled');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
|
||||
@@ -1131,7 +1131,7 @@ class task extends control
|
||||
else
|
||||
{
|
||||
$this->task->delete(TABLE_TASK, $taskID);
|
||||
if($task->parent) $this->task->updateParentStatus($task->id);
|
||||
if($task->parent > 0) $this->task->updateParentStatus($task->id);
|
||||
if($task->fromBug != 0) $this->dao->update(TABLE_BUG)->set('toTask')->eq(0)->where('id')->eq($task->fromBug)->exec();
|
||||
if($task->story) $this->loadModel('story')->setStage($task->story);
|
||||
if(!empty($task->children))
|
||||
|
||||
+456
-456
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user