diff --git a/module/action/lang/de.php b/module/action/lang/de.php index 988570d7ce..d3f0dbfedd 100644 --- a/module/action/lang/de.php +++ b/module/action/lang/de.php @@ -209,6 +209,7 @@ $lang->action->desc->importedbuild = '$date, imported to $extraaction->desc->fromsonarqube = '$date, created by $actor from SonarQube Issue.' . "\n"; $lang->action->desc->tolib = '$date, imported by $actor .' . "\n"; $lang->action->desc->updatetolib = '$date, updated to ' . $lang->testcase->common . ' by $actor.' . "\n"; +$lang->action->desc->adjusttasktowait = '$date, System Reminder: The task status will be set to Not Started as the consumed work hour is adjusted to 0. ' . "\n"; /* Used to describe the history of operations related to parent-child tasks. */ $lang->action->desc->createchildren = '$date, $actor created a child task $extra。' . "\n"; @@ -305,7 +306,7 @@ $lang->action->label->suspended = 'suspended '; $lang->action->label->login = 'Login'; $lang->action->label->logout = "Logout"; $lang->action->label->notified = "Notified"; -$lang->action->label->deleteestimate = "deleted "; +$lang->action->label->deleteestimate = "deleted hours"; $lang->action->label->linked2build = "linked "; $lang->action->label->linked2bug = "linked "; $lang->action->label->linked2testtask = "linked"; diff --git a/module/action/lang/en.php b/module/action/lang/en.php index e195c73ad7..0ab354241a 100755 --- a/module/action/lang/en.php +++ b/module/action/lang/en.php @@ -209,6 +209,7 @@ $lang->action->desc->importedbuild = '$date, imported to $extraaction->desc->fromsonarqube = '$date, created by $actor from SonarQube Issue.' . "\n"; $lang->action->desc->tolib = '$date, imported by $actor .' . "\n"; $lang->action->desc->updatetolib = '$date, updated to ' . $lang->testcase->common . ' by $actor.' . "\n"; +$lang->action->desc->adjusttasktowait = '$date, System Reminder: The task status will be set to Not Started as the consumed work hour is adjusted to 0. ' . "\n"; /* Used to describe the history of operations related to parent-child tasks. */ $lang->action->desc->createchildren = '$date, $actor created a child task $extra。' . "\n"; @@ -305,7 +306,7 @@ $lang->action->label->suspended = 'suspended '; $lang->action->label->login = 'login'; $lang->action->label->logout = "logout"; $lang->action->label->notified = "Notified"; -$lang->action->label->deleteestimate = "deleted "; +$lang->action->label->deleteestimate = "deleted hours"; $lang->action->label->linked2build = "linked "; $lang->action->label->linked2bug = "linked "; $lang->action->label->linked2testtask = "linked"; diff --git a/module/action/lang/fr.php b/module/action/lang/fr.php index fb1c45ebc5..01c2a52222 100644 --- a/module/action/lang/fr.php +++ b/module/action/lang/fr.php @@ -209,6 +209,7 @@ $lang->action->desc->importedbuild = '$date, imported to $extraaction->desc->fromsonarqube = '$date, created by $actor from SonarQube Issue.' . "\n"; $lang->action->desc->tolib = '$date, Importé par $actor .' . "\n"; $lang->action->desc->updatetolib = '$date, MàJ de ' . $lang->testcase->common . ' par $actor.' . "\n"; +$lang->action->desc->adjusttasktowait = '$date, System Reminder: The task status will be set to Not Started as the consumed work hour is adjusted to 0. ' . "\n"; /* Used to describe the history of operations related to parent-child tasks. */ $lang->action->desc->createchildren = '$date, $actor a créé un sous-tâche $extra。' . "\n"; diff --git a/module/action/lang/zh-cn.php b/module/action/lang/zh-cn.php index 4b332524af..a9011287c3 100755 --- a/module/action/lang/zh-cn.php +++ b/module/action/lang/zh-cn.php @@ -209,6 +209,7 @@ $lang->action->desc->importedbuild = '$date, 由 $actor $lang->action->desc->fromsonarqube = '$date, 由 $actor 从SonarQube问题转化而来。' . "\n"; $lang->action->desc->tolib = '$date, 由 $actor 导入。' . "\n"; $lang->action->desc->updatetolib = '$date, 由 $actor 从' . $lang->testcase->common . '更新。' . "\n"; +$lang->action->desc->adjusttasktowait = '$date, 系统判断由于消耗工时调整为0,将任务状态置为未开始。' . "\n"; /* 用来描述和父子任务相关的操作历史记录。*/ $lang->action->desc->createchildren = '$date, 由 $actor 创建子任务 $extra。' . "\n"; diff --git a/module/block/view/dynamic.html.php b/module/block/view/dynamic.html.php index 2aa17ecc16..e2e44aac2d 100644 --- a/module/block/view/dynamic.html.php +++ b/module/block/view/dynamic.html.php @@ -18,6 +18,7 @@ $i = 0; foreach($actions as $action) { + if($action->action == 'adjusttasktowait') continue; $user = zget($users, $action->actor); if($action->action == 'login' or $action->action == 'logout') $action->objectName = $action->objectLabel = ''; if($action->objectType == 'sonarqubeproject') $action->objectName = $action->extra; diff --git a/module/company/view/dynamic.html.php b/module/company/view/dynamic.html.php index d8f5338795..0b4a7e45ad 100644 --- a/module/company/view/dynamic.html.php +++ b/module/company/view/dynamic.html.php @@ -64,6 +64,7 @@
    $action):?> + action == 'adjusttasktowait') continue;?>
  • major) echo "class='active'";?>>
    diff --git a/module/task/control.php b/module/task/control.php index 9f727f70bd..12de6046d7 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -1187,19 +1187,36 @@ class task extends control */ public function deleteEstimate($estimateID, $confirm = 'no') { - if($confirm == 'no') + $estimate = $this->task->getEstimateById($estimateID); + $task = $this->task->getById($estimate->task); + if($confirm == 'no' and $task->consumed - $estimate->consumed != 0) { return print(js::confirm($this->lang->task->confirmDeleteEstimate, $this->createLink('task', 'deleteEstimate', "estimateID=$estimateID&confirm=yes"))); } + elseif($confirm == 'no' and $task->consumed - $estimate->consumed == 0) + { + return print(js::confirm($this->lang->task->confirmDeleteLastEstimate, $this->createLink('task', 'deleteEstimate', "estimateID=$estimateID&confirm=yes"))); + } else { - $estimate = $this->task->getEstimateById($estimateID); $changes = $this->task->deleteEstimate($estimateID); if(dao::isError()) return print(js::error(dao::getError())); $actionID = $this->loadModel('action')->create('task', $estimate->task, 'DeleteEstimate'); $this->action->logHistory($actionID, $changes); - return print(js::reload('parent')); + if($task->consumed - $estimate->consumed == 0) + { + $actionID = $this->loadModel('action')->create('task', $estimate->task, 'Adjusttasktowait'); + $this->action->logHistory($actionID, $changes); + } + if($task->consumed - $estimate->consumed == 0) + { + return print(js::reload('parent.parent')); + } + else + { + return print(js::reload('parent')); + } } } diff --git a/module/task/lang/de.php b/module/task/lang/de.php index 137364c86d..6bd4ae30b7 100644 --- a/module/task/lang/de.php +++ b/module/task/lang/de.php @@ -214,27 +214,27 @@ $lang->task->legendDesc = 'Aufgabenbeschreibung'; $lang->task->legendDetail = 'Task Detail'; $lang->task->legendMisc = 'Misc.'; -$lang->task->confirmDelete = "Möchten Sie diese Aufgabe löschen?"; -$lang->task->confirmDeleteEstimate = "Möchten Sie das löschen?"; -$lang->task->copyStoryTitle = "Story kopieren"; -$lang->task->afterSubmit = "Nach der Erstellung,"; -$lang->task->successSaved = "Erstellt!"; -$lang->task->delayWarning = " Verzögerung %s Tage "; -$lang->task->remindBug = "Diese Aufgabe wurde aus einem Bus erzeugt. Möchten Sie den Bug aktualisieren:%s?"; -$lang->task->remindIssue = "This task is converted from a issue. Do you want to update the Issue:%s?"; -$lang->task->confirmChangeExecution = "Wenn Sie {$lang->executionCommon} ändern, das verwendete Modul, Story and Assignor will be changed. Do you want to do it?"; -$lang->task->confirmFinish = '"Reststunden " sind 0. Möchten Sue den Status auf Erledigt setzen?'; -$lang->task->confirmRecord = '"Reststunden " sind 0. Möchten Sie den Task auf Erledigt setzen?'; -$lang->task->confirmTransfer = '"Reststunden " sind 0. Möchten Sie den Task transferieren?'; -$lang->task->noticeTaskStart = '"Cost Hour" and "Left Hour" cannot be 0 at the same time.'; -$lang->task->noticeLinkStory = "Es wurde keine Story verknüpft. Sie können %s für dieses Projekt, anschließend %s."; -$lang->task->noticeSaveRecord = 'Ihre Stunden wurden nicht gespeichrt. Bitte erst speichern.'; -$lang->task->commentActions = '%s. %s, kommentiert von %s.'; -$lang->task->deniedNotice = 'Nur %s kann die Aufgabe %s.'; -$lang->task->noTask = 'Keine Aufagben. '; -$lang->task->createDenied = 'Aufgben erstellen it in diesem Projekt gesperrt'; -$lang->task->cannotDeleteParent = 'Cannot delete parent task'; -$lang->task->addChildTask = 'Because the task has already consumed consumption, to ensure data consistency, we will help you create a subtask with the same name to record the consumption.'; +$lang->task->confirmDelete = "Möchten Sie diese Aufgabe löschen?"; +$lang->task->confirmDeleteLastEstimate = "Do you want to delete the log? After deleting the last work log, the task status will be adjusted to Not Started."; +$lang->task->copyStoryTitle = "Story kopieren"; +$lang->task->afterSubmit = "Nach der Erstellung,"; +$lang->task->successSaved = "Erstellt!"; +$lang->task->delayWarning = " Verzögerung %s Tage "; +$lang->task->remindBug = "Diese Aufgabe wurde aus einem Bus erzeugt. Möchten Sie den Bug aktualisieren:%s?"; +$lang->task->remindIssue = "This task is converted from a issue. Do you want to update the Issue:%s?"; +$lang->task->confirmChangeExecution = "Wenn Sie {$lang->executionCommon} ändern, das verwendete Modul, Story and Assignor will be changed. Do you want to do it?"; +$lang->task->confirmFinish = '"Reststunden " sind 0. Möchten Sue den Status auf Erledigt setzen?'; +$lang->task->confirmRecord = '"Reststunden " sind 0. Möchten Sie den Task auf Erledigt setzen?'; +$lang->task->confirmTransfer = '"Reststunden " sind 0. Möchten Sie den Task transferieren?'; +$lang->task->noticeTaskStart = '"Cost Hour" and "Left Hour" cannot be 0 at the same time.'; +$lang->task->noticeLinkStory = "Es wurde keine Story verknüpft. Sie können %s für dieses Projekt, anschließend %s."; +$lang->task->noticeSaveRecord = 'Ihre Stunden wurden nicht gespeichrt. Bitte erst speichern.'; +$lang->task->commentActions = '%s. %s, kommentiert von %s.'; +$lang->task->deniedNotice = 'Nur %s kann die Aufgabe %s.'; +$lang->task->noTask = 'Keine Aufagben. '; +$lang->task->createDenied = 'Aufgben erstellen it in diesem Projekt gesperrt'; +$lang->task->cannotDeleteParent = 'Cannot delete parent task'; +$lang->task->addChildTask = 'Because the task has already consumed consumption, to ensure data consistency, we will help you create a subtask with the same name to record the consumption.'; $lang->task->error = new stdclass(); $lang->task->error->totalNumber = '"Total Cost" must be numbers.'; diff --git a/module/task/lang/en.php b/module/task/lang/en.php index ab272e262c..3561bfae37 100755 --- a/module/task/lang/en.php +++ b/module/task/lang/en.php @@ -214,27 +214,28 @@ $lang->task->legendDesc = 'Task Description'; $lang->task->legendDetail = 'Task Detail'; $lang->task->legendMisc = 'Misc.'; -$lang->task->confirmDelete = "Do you want to delete this task?"; -$lang->task->confirmDeleteEstimate = "Do you want to delete it?"; -$lang->task->copyStoryTitle = "Copy Story"; -$lang->task->afterSubmit = "Next "; -$lang->task->successSaved = "Created!"; -$lang->task->delayWarning = " Delay %s days "; -$lang->task->remindBug = "This task is converted from a bug. Do you want to update the Bug:%s?"; -$lang->task->remindIssue = "This task is converted from a issue. Do you want to update the Issue:%s?"; -$lang->task->confirmChangeExecution = "If you change {$lang->executionCommon}, Module, Story and AssignedTo will also be changed. Do you want to change it?"; -$lang->task->confirmFinish = '"Left Hour" is 0. Do you want to change the status to "Finished"?'; -$lang->task->confirmRecord = '"Left Hour" is 0. Do you want to set the task as "Finished"?'; -$lang->task->confirmTransfer = '"Left Hour" is 0,Do you want to transfer task?'; -$lang->task->noticeTaskStart = '"Cost Hour" and "Left Hour" cannot be 0 at the same time.'; -$lang->task->noticeLinkStory = "No story has been linked. You can %s for this project, then %s."; -$lang->task->noticeSaveRecord = 'Your Hour is not saved. Please save it first.'; -$lang->task->commentActions = '%s. %s, commented by %s.'; -$lang->task->deniedNotice = 'Only the %s can %s the task.'; -$lang->task->noTask = 'No tasks yet. '; -$lang->task->createDenied = 'Create Task is denied in this project'; -$lang->task->cannotDeleteParent = 'Cannot delete parent task'; -$lang->task->addChildTask = 'Because the task has cost hours, ZenTao will create a child task with the same name to record the cost housrs to ensure data consistency.'; +$lang->task->confirmDelete = "Do you want to delete this task?"; +$lang->task->confirmDeleteEstimate = "Do you want to delete it?"; +$lang->task->confirmDeleteLastEstimate = "Do you want to delete the log? After deleting the last work log, the task status will be adjusted to Not Started."; +$lang->task->copyStoryTitle = "Copy Story"; +$lang->task->afterSubmit = "Next "; +$lang->task->successSaved = "Created!"; +$lang->task->delayWarning = " Delay %s days "; +$lang->task->remindBug = "This task is converted from a bug. Do you want to update the Bug:%s?"; +$lang->task->remindIssue = "This task is converted from a issue. Do you want to update the Issue:%s?"; +$lang->task->confirmChangeExecution = "If you change {$lang->executionCommon}, Module, Story and AssignedTo will also be changed. Do you want to change it?"; +$lang->task->confirmFinish = '"Left Hour" is 0. Do you want to change the status to "Finished"?'; +$lang->task->confirmRecord = '"Left Hour" is 0. Do you want to set the task as "Finished"?'; +$lang->task->confirmTransfer = '"Left Hour" is 0,Do you want to transfer task?'; +$lang->task->noticeTaskStart = '"Cost Hour" and "Left Hour" cannot be 0 at the same time.'; +$lang->task->noticeLinkStory = "No story has been linked. You can %s for this project, then %s."; +$lang->task->noticeSaveRecord = 'Your Hour is not saved. Please save it first.'; +$lang->task->commentActions = '%s. %s, commented by %s.'; +$lang->task->deniedNotice = 'Only the %s can %s the task.'; +$lang->task->noTask = 'No tasks yet. '; +$lang->task->createDenied = 'Create Task is denied in this project'; +$lang->task->cannotDeleteParent = 'Cannot delete parent task'; +$lang->task->addChildTask = 'Because the task has cost hours, ZenTao will create a child task with the same name to record the cost housrs to ensure data consistency.'; $lang->task->error = new stdclass(); $lang->task->error->totalNumber = '"Total Cost" must be numbers.'; diff --git a/module/task/lang/fr.php b/module/task/lang/fr.php index 555df916b6..eb892c7518 100644 --- a/module/task/lang/fr.php +++ b/module/task/lang/fr.php @@ -214,27 +214,28 @@ $lang->task->legendDesc = 'Description Tâche'; $lang->task->legendDetail = 'Task Detail'; $lang->task->legendMisc = 'Misc.'; -$lang->task->confirmDelete = "Voulez-vous réellement supprimer cette tâche ?"; -$lang->task->confirmDeleteEstimate = "Voulez-vous la supprimer ?"; -$lang->task->copyStoryTitle = 'StoryModel'; -$lang->task->afterSubmit = "Suiv. "; -$lang->task->successSaved = "Créée !"; -$lang->task->delayWarning = " Retard %s jours "; -$lang->task->remindBug = "Cette tâche a été convertie depuis un bug. Voulez-vous mettre à jour le Bug : %s ?"; -$lang->task->remindIssue = "This task is converted from a issue. Do you want to update the Issue:%s?"; -$lang->task->confirmChangeExecution = "Si vous changez {$lang->executionCommon}, Module, Story et AssignedTo seront également changés. Voulez-vous le faire ?"; -$lang->task->confirmFinish = '"Heures Restantes" à 0. Voulez-vous passer le statut à "Terminée" ?'; -$lang->task->confirmRecord = '"Heures Restantes" à 0. Voulez-vous passer le statut de la tâche à "Finie" ?'; -$lang->task->confirmTransfer = '"Heures Restantes" à 0. Voulez-vous transférer la tâche ?'; -$lang->task->noticeTaskStart = '"Cost Hour" and "Left Hour" cannot be 0 at the same time.'; -$lang->task->noticeLinkStory = "Aucune Story n'est associée. Vous pouvez %s pour ce projet, alors %s."; -$lang->task->noticeSaveRecord = "Votre temps n'a pas été sauvé. Enregistrez-le d'abord."; -$lang->task->commentActions = '%s. %s, commenté par %s.'; -$lang->task->deniedNotice = 'Seulement le %s peut %s la tâche.'; -$lang->task->noTask = "Pas de tâche pour l'instant. "; -$lang->task->createDenied = 'La création de tâches est interdite dans ce projet'; -$lang->task->cannotDeleteParent = 'Impossible de supprimer la tâche parente'; -$lang->task->addChildTask = 'Because the task has already consumed consumption, to ensure data consistency, we will help you create a subtask with the same name to record the consumption.'; +$lang->task->confirmDelete = "Voulez-vous réellement supprimer cette tâche ?"; +$lang->task->confirmDeleteEstimate = "Voulez-vous la supprimer ?"; +$lang->task->confirmDeleteLastEstimate = "Do you want to delete the log? After deleting the last work log, the task status will be adjusted to Not Started."; +$lang->task->copyStoryTitle = 'StoryModel'; +$lang->task->afterSubmit = "Suiv. "; +$lang->task->successSaved = "Créée !"; +$lang->task->delayWarning = " Retard %s jours "; +$lang->task->remindBug = "Cette tâche a été convertie depuis un bug. Voulez-vous mettre à jour le Bug : %s ?"; +$lang->task->remindIssue = "This task is converted from a issue. Do you want to update the Issue:%s?"; +$lang->task->confirmChangeExecution = "Si vous changez {$lang->executionCommon}, Module, Story et AssignedTo seront également changés. Voulez-vous le faire ?"; +$lang->task->confirmFinish = '"Heures Restantes" à 0. Voulez-vous passer le statut à "Terminée" ?'; +$lang->task->confirmRecord = '"Heures Restantes" à 0. Voulez-vous passer le statut de la tâche à "Finie" ?'; +$lang->task->confirmTransfer = '"Heures Restantes" à 0. Voulez-vous transférer la tâche ?'; +$lang->task->noticeTaskStart = '"Cost Hour" and "Left Hour" cannot be 0 at the same time.'; +$lang->task->noticeLinkStory = "Aucune Story n'est associée. Vous pouvez %s pour ce projet, alors %s."; +$lang->task->noticeSaveRecord = "Votre temps n'a pas été sauvé. Enregistrez-le d'abord."; +$lang->task->commentActions = '%s. %s, commenté par %s.'; +$lang->task->deniedNotice = 'Seulement le %s peut %s la tâche.'; +$lang->task->noTask = "Pas de tâche pour l'instant. "; +$lang->task->createDenied = 'La création de tâches est interdite dans ce projet'; +$lang->task->cannotDeleteParent = 'Impossible de supprimer la tâche parente'; +$lang->task->addChildTask = 'Because the task has already consumed consumption, to ensure data consistency, we will help you create a subtask with the same name to record the consumption.'; $lang->task->error = new stdclass(); $lang->task->error->totalNumber = '"Coût Total" doit être numérique.'; diff --git a/module/task/lang/zh-cn.php b/module/task/lang/zh-cn.php index c7a13670fa..fb3a7b85ca 100755 --- a/module/task/lang/zh-cn.php +++ b/module/task/lang/zh-cn.php @@ -214,27 +214,28 @@ $lang->task->legendDesc = '任务描述'; $lang->task->legendDetail = '任务详情'; $lang->task->legendMisc = '其他相关'; -$lang->task->confirmDelete = "您确定要删除这个任务吗?"; -$lang->task->confirmDeleteEstimate = "您确定要删除这个记录吗?"; -$lang->task->copyStoryTitle = "同{$lang->SRCommon}"; -$lang->task->afterSubmit = "添加之后"; -$lang->task->successSaved = "成功添加,"; -$lang->task->delayWarning = " 延期%s天 "; -$lang->task->remindBug = "该任务为Bug转化得到,是否更新Bug:%s ?"; -$lang->task->remindIssue = "该任务为问题转化得到,是否更新问题:%s ?"; -$lang->task->confirmChangeExecution = "修改{$lang->executionCommon}会导致相应的所属模块、相关{$lang->SRCommon}和指派人发生变化,确定吗?"; -$lang->task->confirmFinish = '"预计剩余"为0,确认将任务状态改为"已完成"吗?'; -$lang->task->confirmRecord = '"剩余"为0,任务将标记为"已完成",您确定吗?'; -$lang->task->confirmTransfer = '"当前剩余"为0,任务将被转交,您确定吗?'; -$lang->task->noticeTaskStart = '"总计消耗"和"预计剩余"不能同时为0'; -$lang->task->noticeLinkStory = "没有可关联的相关{$lang->SRCommon},您可以为当前项目%s,然后%s"; -$lang->task->noticeSaveRecord = '您有尚未保存的工时记录,请先将其保存。'; -$lang->task->commentActions = '%s. %s, 由 %s 添加备注。'; -$lang->task->deniedNotice = '当前任务只有%s才可以%s。'; -$lang->task->noTask = '暂时没有任务。'; -$lang->task->createDenied = '你不能在该项目添加任务'; -$lang->task->cannotDeleteParent = '不能删除父任务。'; -$lang->task->addChildTask = '因该任务已经产生消耗,为保证数据一致性,我们会帮您创建一条同名子任务记录该消耗。'; +$lang->task->confirmDelete = "您确定要删除这个任务吗?"; +$lang->task->confirmDeleteEstimate = "您确定要删除这个记录吗?"; +$lang->task->confirmDeleteLastEstimate = "您确定要删除该条日志吗?删除最后一条工时日志后,该任务状态将调整为未开始。"; +$lang->task->copyStoryTitle = "同{$lang->SRCommon}"; +$lang->task->afterSubmit = "添加之后"; +$lang->task->successSaved = "成功添加,"; +$lang->task->delayWarning = " 延期%s天 "; +$lang->task->remindBug = "该任务为Bug转化得到,是否更新Bug:%s ?"; +$lang->task->remindIssue = "该任务为问题转化得到,是否更新问题:%s ?"; +$lang->task->confirmChangeExecution = "修改{$lang->executionCommon}会导致相应的所属模块、相关{$lang->SRCommon}和指派人发生变化,确定吗?"; +$lang->task->confirmFinish = '"预计剩余"为0,确认将任务状态改为"已完成"吗?'; +$lang->task->confirmRecord = '"剩余"为0,任务将标记为"已完成",您确定吗?'; +$lang->task->confirmTransfer = '"当前剩余"为0,任务将被转交,您确定吗?'; +$lang->task->noticeTaskStart = '"总计消耗"和"预计剩余"不能同时为0'; +$lang->task->noticeLinkStory = "没有可关联的相关{$lang->SRCommon},您可以为当前项目%s,然后%s"; +$lang->task->noticeSaveRecord = '您有尚未保存的工时记录,请先将其保存。'; +$lang->task->commentActions = '%s. %s, 由 %s 添加备注。'; +$lang->task->deniedNotice = '当前任务只有%s才可以%s。'; +$lang->task->noTask = '暂时没有任务。'; +$lang->task->createDenied = '你不能在该项目添加任务'; +$lang->task->cannotDeleteParent = '不能删除父任务。'; +$lang->task->addChildTask = '因该任务已经产生消耗,为保证数据一致性,我们会帮您创建一条同名子任务记录该消耗。'; $lang->task->error = new stdclass(); $lang->task->error->totalNumber = '"总计消耗"必须为数字'; diff --git a/module/task/model.php b/module/task/model.php index 00f967a9d3..6a013a8c03 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -719,7 +719,6 @@ class taskModel extends model $task->assignedTo = $childTask->assignedTo; $task->assignedDate = $now; } - $task->finishedBy = ''; $task->finishedDate = ''; $task->closedBy = ''; @@ -749,6 +748,7 @@ class taskModel extends model 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'; + if($status == 'wait' and $parentTask->status != 'wait') $action = 'Adjusttasktowait'; if($action) { $actionID = $this->loadModel('action')->create('task', $parentID, $action, '', '', '', false); @@ -833,7 +833,8 @@ class taskModel extends model $currentTask->consumed += (float)$member->consumed; $currentTask->left += (float)$member->left; } - if(empty($oldTask->team) and isset($oldTask->consumed)) $currentTask->consumed += (float)$oldTask->consumed; + + if($this->app->rawMethod == 'edit' and empty($oldTask->team) and isset($oldTask->consumed)) $currentTask->consumed += (float)$oldTask->consumed; if(!empty($task)) { @@ -2834,7 +2835,19 @@ class taskModel extends model $data->consumed = $consumed; $data->left = $left; $data->status = ($left == 0 && $consumed != 0) ? 'done' : $task->status; - + if($left == 0 and $consumed != 0) + { + $data->status = 'done'; + } + elseif($consumed == 0) + { + $data->status = 'wait'; + $data->left = $task->left + $estimate->consumed; + } + else + { + $data->status = $task->status; + } if(!empty($task->team)) { $oldConsumed = $task->team[$estimate->account]->consumed;