This commit is contained in:
wangchunsheng
2010-02-10 05:37:02 +00:00
parent 63b510bbf8
commit cfb919dcd7
4 changed files with 66 additions and 68 deletions

View File

@@ -21,25 +21,53 @@
* @version $Id$
* @link http://www.zentao.cn
*/
$lang->story->common = '需求';
$lang->story->create = "新增需求";
$lang->story->edit = "编辑需求";
$lang->story->change = "变更";
$lang->story->delete = "删除需求";
$lang->story->browse = "需求列表";
$lang->story->view = "需求详情";
$lang->story->manage = "操作";
$lang->story->tasks = "相关任务";
$lang->story->bugs = "Bug";
$lang->story->browse = "需求列表";
$lang->story->create = "新增需求";
$lang->story->change = "变更";
$lang->story->review = '评审';
$lang->story->edit = "编辑需求";
$lang->story->close = '关闭';
$lang->story->delete = "删除需求";
$lang->story->view = "需求详情";
$lang->story->tasks = "相关任务";
$lang->story->bugs = "Bug";
$lang->story->linkStory = '关联需求';
$lang->story->confirmDelete = "您确认删除该需求吗?";
$lang->story->errorFormat = '需求数据有误';
$lang->story->errorEmptyTitle = '标题不能为空';
$lang->story->mustChooseResult = '必须选择评审结果';
$lang->story->mustChoosePreVersion = '必须选择回溯的版本';
$lang->story->linkStory = '关联需求';
$lang->story->ajaxGetProjectStories = '接口:获取项目需求列表';
$lang->story->ajaxGetProductStories = '接口:获取产品需求列表';
$lang->story->common = '需求';
$lang->story->id = '编号';
$lang->story->product = '所属产品';
$lang->story->module = '所属模块';
$lang->story->replease = '发布计划';
$lang->story->bug = '相关bug';
$lang->story->title = '需求名称';
$lang->story->spec = '需求描述';
$lang->story->type = '需求类型 ';
$lang->story->pri = '优先级';
$lang->story->estimate = '预计工时';
$lang->story->status = '当前状态';
$lang->story->stage = '所处阶段';
$lang->story->mailto = '抄送给';
$lang->story->openedBy = '由谁创建';
$lang->story->openedDate = '创建日期';
$lang->story->assignedTo = '指派给';
$lang->story->assignedDate = '指派日期';
$lang->story->lastEditedBy = '最后修改';
$lang->story->lastEditedDate = '最后修改日期';
$lang->story->lastEdited = '最后修改';
$lang->story->closedBy = '由谁关闭';
$lang->story->closedDate = '关闭日期';
$lang->story->closedReason = '关闭原因';
$lang->story->reviewedBy = '由谁评审';
$lang->story->reviewedDate = '评审时间';
$lang->story->version = '版本号';
$lang->story->project = '所属项目';
$lang->story->plan = '所属计划';
$lang->story->comment = '备注';
$lang->story->linkStories = '相关需求';
$lang->story->childStories = '细分需求';
$lang->story->duplicateStory = '重复需求';
$lang->story->reviewResult = '评审结果';
$lang->story->preVersion = '之前版本';
$lang->story->statusList[''] = '';
$lang->story->statusList['draft'] = '草稿';
@@ -90,44 +118,15 @@ $lang->story->legendHistory = '历史记录';
$lang->story->legendVersion = '历史版本';
$lang->story->legendMisc = '其他相关';
$lang->story->review = '评审';
$lang->story->close = '关闭';
$lang->story->id = '编号';
$lang->story->product = '所属产品';
$lang->story->module = '所属模块';
$lang->story->replease = '发布计划';
$lang->story->bug = '相关bug';
$lang->story->title = '需求名称';
$lang->story->spec = '需求描述';
$lang->story->specNote = "建议的需求模板:<br />作为一个<某种类型的用户><br />我要<达成某些目的><br />我这么做的原因是<开发的价值>";
$lang->story->type = '需求类型 ';
$lang->story->pri = '优先级';
$lang->story->estimate = '预计工时';
$lang->story->status = '当前状态';
$lang->story->stage = '所处阶段';
$lang->story->mailto = '抄送给';
$lang->story->openedBy = '由谁创建';
$lang->story->openedDate = '创建日期';
$lang->story->assignedTo = '指派给';
$lang->story->assignedDate = '指派日期';
$lang->story->lastEditedBy = '最后修改';
$lang->story->lastEditedDate = '最后修改日期';
$lang->story->lastEdited = '最后修改';
$lang->story->closedBy = '由谁关闭';
$lang->story->closedDate = '关闭日期';
$lang->story->closedReason = '关闭原因';
$lang->story->reviewedBy = '由谁评审';
$lang->story->reviewedDate = '评审时间';
$lang->story->version = '版本号';
$lang->story->project = '所属项目';
$lang->story->plan = '所属计划';
$lang->story->comment = '备注';
$lang->story->linkStories = '相关需求';
$lang->story->childStories = '细分需求';
$lang->story->duplicateStory = '重复需求';
$lang->story->reviewResult = '评审结果';
$lang->story->preVersion = '之前版本';
$lang->story->specTemplate = "建议参考的模板:<br />作为一名<<i class='red'>某种类型的用户</i>><br />我希望<<i class='red'>达成某些目的</i>><br />这样可以<<i class='red'>开发的价值</i>>";
$lang->story->needNotReview = '不需要评审';
$lang->story->confirmDelete = "您确认删除该需求吗?";
$lang->story->errorFormat = '需求数据有误';
$lang->story->errorEmptyTitle = '标题不能为空';
$lang->story->mustChooseResult = '必须选择评审结果';
$lang->story->mustChoosePreVersion = '必须选择回溯的版本';
$lang->story->ajaxGetProjectStories = '接口:获取项目需求列表';
$lang->story->ajaxGetProductStories = '接口:获取产品需求列表';
$lang->story->action->reviewed = array('main' => '$date, 由 <strong>$actor</strong> 记录评审结果,结果为 <strong>$extra</strong>。', 'extra' => $lang->story->reviewResultList);
$lang->story->action->closed = array('main' => '$date, 由 <strong>$actor</strong> 关闭,原因为 <strong>$extra</strong>。', 'extra' => $lang->story->reasonList);

View File

@@ -71,8 +71,9 @@ class storyModel extends model
->add('version', 1)
->add('status', 'draft')
->setIF($this->post->assignedTo != '', 'assignedDate', $now)
->setIF($this->post->needNotReview, 'status', 'active')
->join('mailto', ',')
->remove('files,labels,spec')
->remove('files,labels,spec,needNotReview')
->get();
$this->dao->insert(TABLE_STORY)->data($story)->autoCheck()->batchCheck('title,estimate', 'notempty')->exec();
if(!dao::isError())
@@ -102,15 +103,15 @@ class storyModel extends model
->stripTags('title')
->add('lastEditedBy', $this->app->user->account)
->add('lastEditedDate', $now)
->setIF($this->post->assignedTo != $oldStory->assignedTo, 'assignedDate', $now)
->setIF($this->post->assignedTo != $oldStory->assignedTo, 'assignedDate', $now)
->setIF($specChanged, 'version', $oldStory->version + 1)
->setIF($specChanged and $oldStory->status == 'active', 'status', 'changed')
->setIF($specChanged and $oldStory->status == 'active' and $this->post->needNotReview == false, 'status', 'changed')
->setIF($specChanged, 'reviewedBy', '')
->setIF($specChanged, 'closedBy', '')
->setIF($specChanged, 'closedReason', '')
->setIF($specChanged and $oldStory->reviewedBy, 'reviewedDate', '0000-00-00')
->setIF($specChanged and $oldStory->closedBy, 'closedDate', '0000-00-00')
->remove('files,labels,spec,comment')
->remove('files,labels,spec,comment,needNotReview')
->get();
$this->dao->update(TABLE_STORY)
->data($story)

View File

@@ -29,7 +29,7 @@
<caption><?php echo $lang->story->change;?></caption>
<tr>
<th class='rowhead'><?php echo $lang->story->reviewedBy;?></th>
<td><?php echo html::select('assignedTo', $users, $story->reviewedBy, 'class="select-3"');?></td>
<td><?php echo html::select('assignedTo', $users, $story->reviewedBy, 'class="select-3"') . html::checkbox('needNotReview', $lang->story->needNotReview);?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->story->title;?></th>
@@ -37,7 +37,7 @@
</tr>
<tr>
<th class='rowhead'><?php echo $lang->story->spec;?></th>
<td><?php echo html::textarea('spec', $story->spec, 'rows=5 class="area-1"');?><br /> <?php echo $lang->story->specNote;?></td>
<td><?php echo html::textarea('spec', $story->spec, 'rows=5 class="area-1"');?><br /> <?php echo $lang->story->specTemplate;?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->story->comment;?></th>

View File

@@ -23,9 +23,7 @@
*/
?>
<?php include './header.html.php';?>
<style>
#plan {width:245px}
</style>
<style>#plan {width:245px}</style>
<div class='yui-d0'>
<form method='post' enctype='multipart/form-data' target='hiddenwin'>
<table align='center' class='table-1'>
@@ -50,8 +48,8 @@
<td><input type='text' name='estimate' id='estimate' class='text-3' /></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->story->assignedTo;?></th>
<td><?php echo html::select('assignedTo', $users, '', 'class=select-3');?></td>
<th class='rowhead'><?php echo $lang->story->reviewedBy;?></th>
<td><?php echo html::select('assignedTo', $users, '', 'class=select-3') . html::checkbox('needNotReview', $lang->story->needNotReview);?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->story->title;?></th>
@@ -59,7 +57,7 @@
</tr>
<tr>
<th class='rowhead'><?php echo $lang->story->spec;?></th>
<td><textarea name='spec' rows='8' class='text-1'></textarea><br /><?php echo $lang->story->specNote;?></td>
<td><textarea name='spec' rows='8' class='text-1'></textarea><br /><?php echo $lang->story->specTemplate;?></td>
</tr>
<tr>
<th class='rowhead'><nobr><?php echo $lang->story->mailto;?></nobr></th>