diff --git a/module/task/control.php b/module/task/control.php old mode 100644 new mode 100755 index 6a8a17aa23..439e42ce03 --- a/module/task/control.php +++ b/module/task/control.php @@ -1383,6 +1383,19 @@ class task extends control { $task = $this->task->getById($taskID); $execution = $this->execution->getByID($task->execution); + + if(isset($task->fromIssue) and $task->fromIssue > 0) + { + $fromIssue = $this->loadModel('issue')->getByID($task->fromIssue); + if($fromIssue->status != 'closed') + { + $confirmURL = $this->createLink('issue', 'close', "id=$task->fromIssue"); + unset($_GET['onlybody']); + $cancelURL = $this->createLink('task', 'view', "taskID=$taskID"); + return print(js::confirm(sprintf($this->lang->task->remindIssue, $task->fromIssue), $confirmURL, $cancelURL, 'parent', 'parent.parent')); + } + } + if($execution->type == 'kanban' and $this->app->tab == 'execution') { $regionID = isset($output['regionID']) ? $output['regionID'] : 0; diff --git a/module/task/lang/en.php b/module/task/lang/en.php old mode 100644 new mode 100755 index fd136094ec..1700f8b50f --- a/module/task/lang/en.php +++ b/module/task/lang/en.php @@ -216,6 +216,7 @@ $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"?'; diff --git a/module/task/lang/zh-cn.php b/module/task/lang/zh-cn.php old mode 100644 new mode 100755 index a2470ff572..36c39f6c60 --- a/module/task/lang/zh-cn.php +++ b/module/task/lang/zh-cn.php @@ -216,6 +216,7 @@ $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,任务将标记为"已完成",您确定吗?';