* Finish task #6316.
This commit is contained in:
@@ -415,7 +415,8 @@ class taskModel extends model
|
||||
$oldParentTask = $this->dao->select('*')->from(TABLE_TASK)->where('id')->eq($parentID)->fetch();
|
||||
$this->computeWorkingHours($parentID);
|
||||
|
||||
$childrenStatus = $this->dao->select('id,status')->from(TABLE_TASK)->where('parent')->eq($parentID)->andWhere('deleted')->eq(0)->fetchPairs('status', 'status');
|
||||
$childrenStatus = $this->dao->select('id,status')->from(TABLE_TASK)->where('parent')->eq($parentID)->andWhere('deleted')->eq(0)->fetchPairs('status', 'status');
|
||||
$childrenClosedReason = $this->dao->select('closedReason')->from(TABLE_TASK)->where('parent')->eq($parentID)->andWhere('deleted')->eq(0)->fetchPairs('closedReason');
|
||||
if(empty($childrenStatus)) return $this->dao->update(TABLE_TASK)->set('parent')->eq('0')->where('id')->eq($parentID)->exec();
|
||||
|
||||
$status = '';
|
||||
@@ -429,7 +430,7 @@ class taskModel extends model
|
||||
{
|
||||
$status = 'doing';
|
||||
}
|
||||
elseif(isset($childrenStatus['done']) && isset($childrenStatus['wait']))
|
||||
elseif((isset($childrenStatus['done']) or isset($childrenClosedReason['done'])) && isset($childrenStatus['wait']))
|
||||
{
|
||||
$status = 'doing';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user