* Code for bug#32489.
This commit is contained in:
@@ -2931,14 +2931,17 @@ class executionModel extends model
|
||||
$this->loadModel('task');
|
||||
|
||||
$taskStories = array();
|
||||
$parents = array();
|
||||
$execution = $this->getByID($executionID);
|
||||
$tasks = $this->dao->select('id,execution,assignedTo,story,consumed,status')->from(TABLE_TASK)->where('id')->in($this->post->tasks)->fetchAll('id');
|
||||
$tasks = $this->dao->select('id,execution,assignedTo,story,consumed,status,parent')->from(TABLE_TASK)->where('id')->in($this->post->tasks)->fetchAll('id');
|
||||
foreach($tasks as $task)
|
||||
{
|
||||
/* Save the assignedToes and stories, should linked to execution. */
|
||||
$assignedToes[$task->assignedTo] = $task->execution;
|
||||
$taskStories[$task->story] = $task->story;
|
||||
|
||||
if($task->parent < 0) $parents[$task->id] = $task->id;
|
||||
|
||||
$data = new stdclass();
|
||||
$data->project = $execution->project;
|
||||
$data->execution = $executionID;
|
||||
@@ -2958,6 +2961,10 @@ class executionModel extends model
|
||||
$this->loadModel('action')->create('task', $task->id, 'moved', '', $task->execution);
|
||||
}
|
||||
|
||||
/* Get stories of children task. */
|
||||
$childrens = $this->dao->select('*')->from(TABLE_TASK)->where('parent')->in($parents)->fetchAll('id');
|
||||
foreach($childrens as $children) $taskStories[$children->story] = $children->story;
|
||||
|
||||
/* Remove empty story. */
|
||||
unset($taskStories[0]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user