diff --git a/trunk/module/story/control.php b/trunk/module/story/control.php index 062aec48fc..c2454dcf5d 100644 --- a/trunk/module/story/control.php +++ b/trunk/module/story/control.php @@ -221,7 +221,9 @@ class story extends control if(!empty($_POST)) { $this->story->review($storyID); - $actionID = $this->action->create('story', $storyID, 'Reviewed', $this->post->comment, ucfirst($this->post->result)); + $result = $this->post->result; + if(strpos('done,postponed,subdivided', $this->post->closedReason) !== false) $result = 'pass'; + $actionID = $this->action->create('story', $storyID, 'Reviewed', $this->post->comment, ucfirst($result)); $this->action->logHistory($actionID); if($this->post->result == 'reject') { @@ -276,8 +278,7 @@ class story extends control $this->product->setMenu($this->product->getPairs(), $product->id); /* 设置评审结果可选值。*/ - if($story->status == 'draft' and $story->version == 1) unset($this->lang->story->reviewResultList['revert']); - if($story->status == 'changed') unset($this->lang->story->reviewResultList['reject']); + if($story->status == 'draft') unset($this->lang->story->reasonList['cancel']); /* 导航信息。*/ $this->view->header->title = $product->name . $this->lang->colon . $this->lang->close . $this->lang->colon . $story->title; diff --git a/trunk/module/story/lang/zh-cn.php b/trunk/module/story/lang/zh-cn.php index c20708911b..23a4883d22 100644 --- a/trunk/module/story/lang/zh-cn.php +++ b/trunk/module/story/lang/zh-cn.php @@ -58,6 +58,7 @@ $lang->story->lastEdited = '最后修改'; $lang->story->closedBy = '由谁关闭'; $lang->story->closedDate = '关闭日期'; $lang->story->closedReason = '关闭原因'; +$lang->story->rejectedReason = '拒绝原因'; $lang->story->reviewedBy = '由谁评审'; $lang->story->reviewedDate = '评审时间'; $lang->story->version = '版本号'; @@ -96,10 +97,10 @@ $lang->story->reasonList['cancel'] = '已取消'; //$lang->story->reasonList['isbug'] = '是个Bug'; $lang->story->reviewResultList[''] = ''; -$lang->story->reviewResultList['pass'] = '通过'; -$lang->story->reviewResultList['clarify']= '需求不明确'; +$lang->story->reviewResultList['pass'] = '确认通过'; $lang->story->reviewResultList['revert'] = '撤销变更'; -$lang->story->reviewResultList['reject'] = '拒绝并关闭'; +$lang->story->reviewResultList['clarify']= '有待明确'; +$lang->story->reviewResultList['reject'] = '拒绝'; $lang->story->priList[3] = '一般'; $lang->story->priList[1] = '最高'; diff --git a/trunk/module/story/model.php b/trunk/module/story/model.php index 6ce1d9b6da..b4748a5480 100644 --- a/trunk/module/story/model.php +++ b/trunk/module/story/model.php @@ -167,7 +167,7 @@ class storyModel extends model ->autoCheck() ->batchCheck('title,estimate', 'notempty') ->checkIF($story->closedBy, 'closedReason', 'notempty') - ->checkIF($story->status == 'closed', 'stage', 'notempty') + ->checkIF($story->closedReason == 'done', 'stage', 'notempty') ->checkIF($story->closedReason == 'duplicate', 'duplicateStory', 'notempty') ->checkIF($story->closedReason == 'subdivided', 'childStories', 'notempty') ->where('id')->eq((int)$storyID)->exec(); @@ -201,6 +201,7 @@ class storyModel extends model ->setIF($this->post->result == 'reject', 'status', 'closed') ->setIF($this->post->result == 'revert', 'version', $this->post->preVersion) ->setIF($this->post->result == 'revert', 'status', 'active') + ->setIF($this->post->closedReason == 'done', 'stage', 'released') ->removeIF($this->post->result != 'reject', 'closedReason, duplicateStory, childStories') ->removeIF($this->post->result == 'reject' and $this->post->closedReason != 'duplicate', 'duplicateStory') ->removeIF($this->post->result == 'reject' and $this->post->closedReason != 'subdivided', 'childStories') diff --git a/trunk/module/story/view/review.html.php b/trunk/module/story/view/review.html.php index e47a42fa16..d3f39370d7 100644 --- a/trunk/module/story/view/review.html.php +++ b/trunk/module/story/view/review.html.php @@ -28,23 +28,23 @@ function switchShow(result) { if(result == 'reject') { - $('#closedReasonBox').show(); + $('#rejectedReasonBox').show(); $('#preVersionBox').hide(); } else if(result == 'revert') { $('#preVersionBox').show(); - $('#closedReasonBox').hide(); + $('#rejectedReasonBox').hide(); $('#duplicateStoryBox').hide(); $('#childStoriesBox').hide(); } else { $('#preVersionBox').hide(); - $('#closedReasonBox').hide(); + $('#rejectedReasonBox').hide(); $('#duplicateStoryBox').hide(); $('#childStoriesBox').hide(); - $('#closedReasonBox').hide(); + $('#rejectedReasonBox').hide(); } } @@ -79,8 +79,8 @@ function setStory(reason) story->reviewResult;?> story->reviewResultList, '', 'class=select-3 onchange="switchShow(this.value)"');?> - - story->closedReason;?> + + story->rejectedReason;?> story->reasonList, '', 'class=select-3 onchange="setStory(this.value)"');?>