diff --git a/module/bug/control.php b/module/bug/control.php index dd9359f34b..e89baa25dc 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -578,9 +578,11 @@ class bug extends control { $storyID = $this->bug->resolve($bugID); if(dao::isError()) die(js::error(dao::getError())); + if($this->post->resolution == 'tostory') { $actionID = $this->action->create('bug', $bugID, 'ToStory', $this->post->comment, $storyID); + $this->action->create('bug', $bugID, 'Closed'); } else { diff --git a/module/bug/lang/zh-cn.php b/module/bug/lang/zh-cn.php index 0891cab970..7a086ed826 100644 --- a/module/bug/lang/zh-cn.php +++ b/module/bug/lang/zh-cn.php @@ -307,5 +307,5 @@ $lang->bug->report->bugHistories->graph->xAxisName = '处理步骤'; /* 操作记录。*/ $lang->bug->action->resolved = array('main' => '$date, 由 $actor 解决,方案为 $extra。', 'extra' => $lang->bug->resolutionList); -$lang->bug->action->tostory = array('main' => '$date, 由 $actor 转化为需求,编号为 $extra。'); +$lang->bug->action->tostory = array('main' => '$date, 由 $actor 转为需求,编号为 $extra。'); $lang->bug->action->totask = array('main' => '$date, 由 $actor 导入为任务,编号为 $extra。'); diff --git a/module/bug/model.php b/module/bug/model.php index 90969ad419..6207f79d43 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -261,8 +261,11 @@ class bugModel extends model ->add('lastEditedDate', $now) ->setDefault('duplicateBug', 0) ->setDefault('assignedTo', $oldBug->openedBy) - ->setIF($this->post->resolution == 'tostory', 'toStory', $storyID) - ->setIF($this->post->resolution == 'tostory', 'status', 'closed') + ->setIF($this->post->resolution == 'tostory', 'toStory', $storyID) + ->setIF($this->post->resolution == 'tostory', 'status', 'closed') + ->setIF($this->post->resolution == 'tostory', 'closedBy', $this->app->user->account) + ->setIF($this->post->resolution == 'tostory', 'closedDate', $now) + ->setIF($this->post->resolution == 'tostory', 'assignedTo', 'closed') ->setIF($this->post->resolution != 'tostory', 'status', 'resolved') ->remove('comment') ->get();