* story #131.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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] = '最高';
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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)
|
||||
<th class='rowhead'><?php echo $lang->story->reviewResult;?></th>
|
||||
<td><?php echo html::select('result', $lang->story->reviewResultList, '', 'class=select-3 onchange="switchShow(this.value)"');?></td>
|
||||
</tr>
|
||||
<tr id='closedReasonBox' class='hidden'>
|
||||
<th class='rowhead'><?php echo $lang->story->closedReason;?></th>
|
||||
<tr id='rejectedReasonBox' class='hidden'>
|
||||
<th class='rowhead'><?php echo $lang->story->rejectedReason;?></th>
|
||||
<td><?php echo html::select('closedReason', $lang->story->reasonList, '', 'class=select-3 onchange="setStory(this.value)"');?></td>
|
||||
</tr>
|
||||
<tr id='duplicateStoryBox' class='hidden'>
|
||||
|
||||
Reference in New Issue
Block a user