* adjust for change parent status.
This commit is contained in:
@@ -41,6 +41,7 @@ $lang->doc->extension = '类型';
|
||||
$lang->doc->size = '大小';
|
||||
$lang->doc->download = '下载';
|
||||
$lang->doc->acl = '权限';
|
||||
$lang->doc->fileName = '附件';
|
||||
$lang->doc->groups = '分组';
|
||||
$lang->doc->users = '用户';
|
||||
$lang->doc->item = '项';
|
||||
|
||||
@@ -68,6 +68,7 @@ $lang->story->hour = '小时';
|
||||
$lang->story->status = '当前状态';
|
||||
$lang->story->stage = '所处阶段';
|
||||
$lang->story->stageAB = '阶段';
|
||||
$lang->story->stagedBy = '设置阶段者';
|
||||
$lang->story->mailto = '抄送给';
|
||||
$lang->story->openedBy = '由谁创建';
|
||||
$lang->story->openedDate = '创建日期';
|
||||
|
||||
@@ -441,8 +441,6 @@ class taskModel extends model
|
||||
$parentTask = $this->dao->select('*')->from(TABLE_TASK)->where('id')->eq($parentID)->fetch();
|
||||
if($status and $parentTask->status != $status)
|
||||
{
|
||||
if($status == 'wait' and $parentTask->status != 'wait') $status = 'doing';
|
||||
|
||||
$now = helper::now();
|
||||
$task = new stdclass();
|
||||
$task->status = $status;
|
||||
@@ -473,7 +471,7 @@ class taskModel extends model
|
||||
$task->closedReason = 'done';
|
||||
}
|
||||
|
||||
if($status == 'doing')
|
||||
if($status == 'doing' or $status == 'wait')
|
||||
{
|
||||
if($parentTask->assignedTo == 'closed')
|
||||
{
|
||||
@@ -496,15 +494,19 @@ class taskModel extends model
|
||||
if(!$createAction) return $task;
|
||||
|
||||
$changes = common::createChanges($parentTask, $task);
|
||||
$action = 'Canceled';
|
||||
$action = '';
|
||||
if($status == 'done') $action = 'Finished';
|
||||
if($status == 'closed') $action = 'Closed';
|
||||
if($status == 'pause') $action = 'Paused';
|
||||
if($status == 'cancel') $action = 'Canceled';
|
||||
if($status == 'doing' and $parentTask->status == 'wait') $action = 'Started';
|
||||
if($status == 'doing' and $parentTask->status == 'pause') $action = 'Restarted';
|
||||
if($status == 'doing' and $parentTask->status != 'wait' and $parentTask->status != 'pause') $action = 'Activated';
|
||||
$actionID = $this->loadModel('action')->create('task', $parentID, $action);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
if($action)
|
||||
{
|
||||
$actionID = $this->loadModel('action')->create('task', $parentID, $action);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user