diff --git a/module/task/control.php b/module/task/control.php index 2a3f17f1ac..a8f0d10819 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -1212,35 +1212,21 @@ class task extends control */ public function deleteEstimate($estimateID, $confirm = 'no') { - $estimate = $this->task->getEstimateById($estimateID); - $task = $this->task->getById($estimate->task); - if($confirm == 'no' and $task->consumed - $estimate->consumed != 0) + if($confirm == 'no') { 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); + $task = $this->task->getById($estimate->task); $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); - if($task->consumed - $estimate->consumed == 0) - { - $actionID = $this->loadModel('action')->create('task', $estimate->task, 'Adjusttasktowait'); - } - if($task->consumed - $estimate->consumed == 0) - { - return print(js::reload('parent.parent')); - } - else - { - return print(js::reload('parent')); - } + + return print(js::reload('parent')); } } diff --git a/module/task/lang/de.php b/module/task/lang/de.php index 430b646abb..caebbf11bf 100644 --- a/module/task/lang/de.php +++ b/module/task/lang/de.php @@ -218,7 +218,6 @@ $lang->task->legendMisc = 'Misc.'; $lang->task->confirmDelete = "Möchten Sie diese Aufgabe löschen?"; $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 = "Story kopieren"; $lang->task->afterSubmit = "Nach der Erstellung,"; $lang->task->successSaved = "Erstellt!"; diff --git a/module/task/lang/en.php b/module/task/lang/en.php index b718afe165..742b160cb8 100755 --- a/module/task/lang/en.php +++ b/module/task/lang/en.php @@ -218,7 +218,6 @@ $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->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!"; diff --git a/module/task/lang/fr.php b/module/task/lang/fr.php index 2ed993f52a..59c45e65d3 100644 --- a/module/task/lang/fr.php +++ b/module/task/lang/fr.php @@ -218,7 +218,6 @@ $lang->task->legendMisc = 'Misc.'; $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 !"; diff --git a/module/task/lang/zh-cn.php b/module/task/lang/zh-cn.php index c49928e9ac..943a5b1862 100755 --- a/module/task/lang/zh-cn.php +++ b/module/task/lang/zh-cn.php @@ -218,7 +218,6 @@ $lang->task->legendMisc = '其他相关'; $lang->task->confirmDelete = "您确定要删除这个任务吗?"; $lang->task->confirmDeleteEstimate = "您确定要删除这个记录吗?"; -$lang->task->confirmDeleteLastEstimate = "您确定要删除该条日志吗?删除最后一条工时日志后,该任务状态将调整为未开始。"; $lang->task->copyStoryTitle = "同{$lang->SRCommon}"; $lang->task->afterSubmit = "添加之后"; $lang->task->successSaved = "成功添加,"; diff --git a/module/task/view/recordestimate.html.php b/module/task/view/recordestimate.html.php index 58c0bc9e51..729310c857 100644 --- a/module/task/view/recordestimate.html.php +++ b/module/task/view/recordestimate.html.php @@ -16,7 +16,7 @@ .table-recorded thead{background: rgb(245 245 245);} members;?> -mode == 'linear' && && $task->assignedTo != end($members)) ? $lang->task->confirmTransfer : $lang->task->confirmRecord);?> +mode == 'linear' && $task->assignedTo != end($members)) ? $lang->task->confirmTransfer : $lang->task->confirmRecord);?> task->noticeSaveRecord);?>