diff --git a/module/action/model.php b/module/action/model.php
index ac6c7071b7..0204164ac4 100755
--- a/module/action/model.php
+++ b/module/action/model.php
@@ -635,6 +635,10 @@ class actionModel extends model
{
$desc = $this->lang->{$objectType}->action->{$actionType};
}
+ elseif(in_array($action->extra, array('autobyparent', 'autobychild')) && isset($this->lang->{$objectType}) && isset($this->lang->{$objectType}->action->{$action->extra . $actionType}))
+ {
+ $desc = $this->lang->{$objectType}->action->{$action->extra . $actionType};
+ }
elseif($action->objectType == 'instance' && isset($this->lang->action->desc->{$actionType}))
{
$desc = $this->lang->action->desc->{$actionType};
diff --git a/module/task/lang/de.php b/module/task/lang/de.php
index 1c52bd6077..f033d8ea7f 100644
--- a/module/task/lang/de.php
+++ b/module/task/lang/de.php
@@ -253,8 +253,16 @@ $lang->task->legendDetail = 'Task Detail';
$lang->task->legendMisc = 'Misc.';
$lang->task->action = new stdclass();
-$lang->task->action->linked2revision = array('main' => '$date, linked by $actor to Revision $extra.');
-$lang->task->action->unlinkedfromrevision = array('main' => '$date, unlinked by $actor to Revision $extra.');
+$lang->task->action->linked2revision = array('main' => '$date, linked by $actor to Revision $extra.');
+$lang->task->action->unlinkedfromrevision = array('main' => '$date, unlinked by $actor to Revision $extra.');
+$lang->task->action->autobyparentrestarted = array('main' => '$date, continued parent task by $actor, this task automatically continue.');
+$lang->task->action->autobychildrestarted = array('main' => '$date, continued child task by $actor, this task automatically continue.');
+$lang->task->action->autobyparentpaused = array('main' => '$date, paused parent task by $actor, this task automatically pause.');
+$lang->task->action->autobyparentcanceled = array('main' => '$date, cancelled parent task by $actor, this task automatically cancel.');
+$lang->task->action->autobyparentclosed = array('main' => '$date, closed parent task by $actor, this task automatically close.');
+$lang->task->action->autobychildstarted = array('main' => '$date, started child task by $actor, this task automatically start.');
+$lang->task->action->autobychildfinished = array('main' => '$date, finished child task by $actor, this task automatically finish.');
+$lang->task->action->autobychildactivated = array('main' => '$date, activated child task by $actor, this task automatically activate.');
$lang->task->confirmDelete = "Möchten Sie diese Aufgabe löschen?";
$lang->task->confirmDeleteEffort = "Do you want to delete it?";
diff --git a/module/task/lang/en.php b/module/task/lang/en.php
index 7e4e827692..934c790cb3 100755
--- a/module/task/lang/en.php
+++ b/module/task/lang/en.php
@@ -253,8 +253,16 @@ $lang->task->legendDetail = 'Task Detail';
$lang->task->legendMisc = 'Misc.';
$lang->task->action = new stdclass();
-$lang->task->action->linked2revision = array('main' => '$date, linked by $actor to Revision $extra.');
-$lang->task->action->unlinkedfromrevision = array('main' => '$date, unlinked by $actor to Revision $extra.');
+$lang->task->action->linked2revision = array('main' => '$date, linked by $actor to Revision $extra.');
+$lang->task->action->unlinkedfromrevision = array('main' => '$date, unlinked by $actor to Revision $extra.');
+$lang->task->action->autobyparentrestarted = array('main' => '$date, continued parent task by $actor, this task automatically continue.');
+$lang->task->action->autobychildrestarted = array('main' => '$date, continued child task by $actor, this task automatically continue.');
+$lang->task->action->autobyparentpaused = array('main' => '$date, paused parent task by $actor, this task automatically pause.');
+$lang->task->action->autobyparentcanceled = array('main' => '$date, cancelled parent task by $actor, this task automatically cancel.');
+$lang->task->action->autobyparentclosed = array('main' => '$date, closed parent task by $actor, this task automatically close.');
+$lang->task->action->autobychildstarted = array('main' => '$date, started child task by $actor, this task automatically start.');
+$lang->task->action->autobychildfinished = array('main' => '$date, finished child task by $actor, this task automatically finish.');
+$lang->task->action->autobychildactivated = array('main' => '$date, activated child task by $actor, this task automatically activate.');
$lang->task->confirmDelete = "Do you want to delete this task?";
$lang->task->confirmDeleteEffort = "Do you want to delete it?";
diff --git a/module/task/lang/fr.php b/module/task/lang/fr.php
index d7c78079d1..f511638f2d 100644
--- a/module/task/lang/fr.php
+++ b/module/task/lang/fr.php
@@ -253,8 +253,16 @@ $lang->task->legendDetail = 'Task Detail';
$lang->task->legendMisc = 'Misc.';
$lang->task->action = new stdclass();
-$lang->task->action->linked2revision = array('main' => '$date, linked by $actor to Revision $extra.');
-$lang->task->action->unlinkedfromrevision = array('main' => '$date, unlinked by $actor to Revision $extra.');
+$lang->task->action->linked2revision = array('main' => '$date, linked by $actor to Revision $extra.');
+$lang->task->action->unlinkedfromrevision = array('main' => '$date, unlinked by $actor to Revision $extra.');
+$lang->task->action->autobyparentrestarted = array('main' => '$date, continued parent task by $actor, this task automatically continue.');
+$lang->task->action->autobychildrestarted = array('main' => '$date, continued child task by $actor, this task automatically continue.');
+$lang->task->action->autobyparentpaused = array('main' => '$date, paused parent task by $actor, this task automatically pause.');
+$lang->task->action->autobyparentcanceled = array('main' => '$date, cancelled parent task by $actor, this task automatically cancel.');
+$lang->task->action->autobyparentclosed = array('main' => '$date, closed parent task by $actor, this task automatically close.');
+$lang->task->action->autobychildstarted = array('main' => '$date, started child task by $actor, this task automatically start.');
+$lang->task->action->autobychildfinished = array('main' => '$date, finished child task by $actor, this task automatically finish.');
+$lang->task->action->autobychildactivated = array('main' => '$date, activated child task by $actor, this task automatically activate.');
$lang->task->confirmDelete = "Voulez-vous réellement supprimer cette tâche ?";
$lang->task->confirmDeleteEffort = "Voulez-vous la supprimer ?";
diff --git a/module/task/lang/zh-cn.php b/module/task/lang/zh-cn.php
index b43ff1b987..cfb663b56c 100755
--- a/module/task/lang/zh-cn.php
+++ b/module/task/lang/zh-cn.php
@@ -253,8 +253,16 @@ $lang->task->legendDetail = '任务详情';
$lang->task->legendMisc = '其他相关';
$lang->task->action = new stdclass();
-$lang->task->action->linked2revision = array('main' => '$date, 由 $actor 关联到代码提交 $extra。');
-$lang->task->action->unlinkedfromrevision = array('main' => '$date, 由 $actor 取消关联到代码提交 $extra。');
+$lang->task->action->linked2revision = array('main' => '$date, 由 $actor 关联到代码提交 $extra。');
+$lang->task->action->unlinkedfromrevision = array('main' => '$date, 由 $actor 取消关联到代码提交 $extra。');
+$lang->task->action->autobyparentrestarted = array('main' => '$date, 由 $actor 继续父任务,该任务自动继续。');
+$lang->task->action->autobychildrestarted = array('main' => '$date, 由 $actor 继续子任务,该任务自动继续。');
+$lang->task->action->autobyparentpaused = array('main' => '$date, 由 $actor 暂停父任务,该任务自动暂停。');
+$lang->task->action->autobyparentcanceled = array('main' => '$date, 由 $actor 取消父任务,该任务自动取消。');
+$lang->task->action->autobyparentclosed = array('main' => '$date, 由 $actor 关闭父任务,该任务自动关闭。');
+$lang->task->action->autobychildstarted = array('main' => '$date, 由 $actor 启动子任务,该任务自动启动。');
+$lang->task->action->autobychildfinished = array('main' => '$date, 由 $actor 完成子任务,该任务自动完成。');
+$lang->task->action->autobychildactivated = array('main' => '$date, 由 $actor 激活子任务,该任务自动激活。');
$lang->task->confirmDelete = "您确定要删除这个任务吗?";
$lang->task->confirmDeleteEffort = "您确定要删除这个记录吗?";
diff --git a/module/task/model.php b/module/task/model.php
index 976460611f..07d877d5ae 100755
--- a/module/task/model.php
+++ b/module/task/model.php
@@ -3282,7 +3282,7 @@ class taskModel extends model
if($parentTask->story) $this->story->setStage($parentTask->story);
/* Create action record. */
- $this->taskTao->createAutoUpdateTaskAction($parentTask);
+ $this->taskTao->createAutoUpdateTaskAction($parentTask, 'child');
if($this->config->edition != 'open' && $parentTask->feedback) $this->loadModel('feedback')->updateStatus('task', $parentTask->feedback, $status, $parentTask->status);
}
}
@@ -3318,7 +3318,7 @@ class taskModel extends model
if($parentStatus == 'pause' && $childTask->status != 'doing') continue;
if($parentStatus == 'cancel' && in_array($childTask->status, array('done', 'closed'))) continue;
if($parentStatus == 'doing' && $childTask->status != 'pause') continue;
- if(isset($autoActions[$childID]) && $autoActions[$childID]->extra != 'auto') continue;
+ if(isset($autoActions[$childID]) && $autoActions[$childID]->extra != 'autobyparent') continue;
$this->taskTao->autoUpdateTaskByStatus($childTask, null, $parentStatus);
if(dao::isError()) return;
@@ -3326,7 +3326,7 @@ class taskModel extends model
if($childTask->story) $this->story->setStage($childTask->story);
/* Create action record. */
- $this->taskTao->createAutoUpdateTaskAction($childTask);
+ $this->taskTao->createAutoUpdateTaskAction($childTask, 'parent');
if($this->config->edition != 'open' && $childTask->feedback) $this->loadModel('feedback')->updateStatus('task', $childTask->feedback, $status, $childTask->status);
}
}
diff --git a/module/task/tao.php b/module/task/tao.php
index f6d6235fdd..83f9a9a471 100644
--- a/module/task/tao.php
+++ b/module/task/tao.php
@@ -408,10 +408,11 @@ class taskTao extends taskModel
* Create action record when auto update task.
*
* @param object $oldTask
+ * @param string $source parent|child
* @access protected
* @return void
*/
- protected function createAutoUpdateTaskAction(object $oldTask) :void
+ protected function createAutoUpdateTaskAction(object $oldTask, string $source = 'parent') :void
{
$newTask = $this->dao->select('*')->from(TABLE_TASK)->where('id')->eq($oldTask->id)->fetch();
@@ -432,7 +433,7 @@ class taskTao extends taskModel
if(!$action) return;
- $actionID = $this->loadModel('action')->create('task', $oldTask->id, $action, '', 'auto', '', false);
+ $actionID = $this->loadModel('action')->create('task', $oldTask->id, $action, '', 'autoby' . $source, '', false);
$this->action->logHistory($actionID, $changes);
}