+ adjust code for release and build.

This commit is contained in:
shiyangyangwork@yahoo.cn
2012-01-03 03:02:48 +00:00
parent a4995694f8
commit 2f84f49ab5
11 changed files with 57 additions and 15 deletions
+1 -1
View File
@@ -124,7 +124,7 @@ class build extends control
$this->view->header->title = $this->lang->build->view;
$this->view->position[] = $this->lang->build->view;
$this->view->products = $this->project->getProducts($build->project);
$this->view->users = $this->loadModel('user')->getPairs();
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->build = $build;
$this->view->stories = $stories;
$this->view->bugs = $bugs;
+3 -3
View File
@@ -28,8 +28,8 @@ $lang->build->builder = 'Builder';
$lang->build->scmPath = 'Source code path';
$lang->build->filePath = 'Package file path';
$lang->build->desc = 'Desc';
$lang->build->linkStoriesAndBugs = 'stories and bugs';
$lang->build->linkStoriesAndBugs = 'stories and bugs';
$lang->build->linkStories = 'Stories';
$lang->build->linkBugs = 'Bugs';
$lang->build->linkedStories = 'Linked stories';
$lang->build->linkedBugs = 'Linked bugs';
$lang->build->stories = 'Linked stories';
$lang->build->bugs = 'Linked bugs';
+3 -3
View File
@@ -28,8 +28,8 @@ $lang->build->builder = '构建者';
$lang->build->scmPath = '源代码地址';
$lang->build->filePath = '存储地址';
$lang->build->desc = '描述';
$lang->build->linkStoriesAndBugs = '关联需求和Bug';
$lang->build->linkStoriesAndBugs = '关联需求和Bug';
$lang->build->linkStories = '相关需求';
$lang->build->linkBugs = '相关Bugs';
$lang->build->linkedStories = '已关联需求';
$lang->build->linkedBugs = '已关联Bugs';
$lang->build->stories = '已关联需求';
$lang->build->bugs = '已关联Bugs';
+2
View File
@@ -135,6 +135,8 @@ class buildModel extends model
{
$oldBuild = $this->getByID($buildID);
$build = fixer::input('post')->stripTags('name')->join('stories', ',')->join('bugs', ',')->get();
if(empty($build->stories)) $build->stories = '';
if(empty($build->bugs)) $build->bugs = '';
$this->dao->update(TABLE_BUILD)->data($build)
->autoCheck()
->batchCheck($this->config->build->edit->requiredFields, 'notempty')
+18 -2
View File
@@ -38,20 +38,28 @@
<td><?php strpos($build->filePath, 'http') === 0 ? printf(html::a($build->filePath)) : printf($build->filePath);?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->build->linkedStories;?></th>
<th class='rowhead'><?php echo $lang->build->stories;?></th>
<td>
<div style="height:225px; overflow-y:auto">
<table class='table-1'>
<tr>
<th class='w-id'><?php echo $lang->idAB;?></th>
<th class='w-pri'><?php echo $lang->priAB;?></th>
<th><?php echo $lang->story->title;?></th>
<th class='w-user'><?php echo $lang->openedByAB;?></th>
<th class='w-hour'><?php echo $lang->story->estimateAB;?></th>
<th class='w-hour'><?php echo $lang->statusAB;?></th>
<th class='w-100px'><?php echo $lang->story->stageAB;?></th>
</tr>
<?php foreach($stories as $storyID => $story):?>
<?php $storyLink = $this->createLink('story', 'view', "storyID=$storyID");?>
<tr class='a-center'>
<td><?php echo sprintf('%03d', $story->id);?></td>
<td><?php echo $lang->story->priList[$story->pri];?></td>
<td class='a-left nobr'><?php echo html::a($storyLink,$story->title);?></td>
<td><?php echo $users[$story->openedBy];?></td>
<td><?php echo $story->estimate;?></td>
<td class='<?php echo $story->status;?>'><?php echo $lang->story->statusList[$story->status];?></td>
<td><?php echo $lang->story->stageList[$story->stage];?></td>
</tr>
<?php endforeach;?>
@@ -60,7 +68,7 @@
</td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->build->linkedBugs;?></th>
<th class='rowhead'><?php echo $lang->build->bugs;?></th>
<td>
<div style="height:225px; overflow-y:auto">
<table class='table-1'>
@@ -68,12 +76,20 @@
<th class='w-id'> <?php echo $lang->idAB;?></th>
<th><?php echo $lang->bug->title;?></th>
<th class='w-100px'><?php echo $lang->bug->status;?></th>
<th class='w-user'><?php echo $lang->openedByAB;?></th>
<th class='w-date'><?php echo $lang->bug->openedDateAB;?></th>
<th class='w-user'><?php echo $lang->bug->resolvedByAB;?></th>
<th class='w-date'><?php echo $lang->bug->resolvedDateAB;?></th>
</tr>
<?php foreach($bugs as $bug):?>
<tr class='a-center'>
<td><?php echo sprintf('%03d', $bug->id);?></td>
<td class='a-left nobr'><?php common::printLink('bug', 'view', "bugID=$bug->id", $bug->title, '', "class='preview'");?></td>
<td><?php echo $lang->bug->statusList[$bug->status];?></td>
<td><?php echo $users[$bug->openedBy];?></td>
<td><?php echo substr($bug->openedDate, 5, 11)?></td>
<td><?php echo $users[$bug->resolvedBy];?></td>
<td><?php echo substr($bug->resolvedDate, 5, 11)?></td>
</tr>
<?php endforeach;?>
</table>
+1
View File
@@ -1031,6 +1031,7 @@ class projectModel extends model
return $this->dao->select('id, title, status')->from(TABLE_BUG)
->where('status')->eq('resolved')
->andWhere('resolvedDate')->ge($project->begin)
->andWhere('resolution')->eq('fixed')
->fetchAll();
}
}
+5
View File
@@ -0,0 +1,5 @@
function loadStoriesAndBugs(buildID,productID)
{
link = createLink('release', 'ajaxGetStoriesAndBugs', 'buildID=' + buildID + '&productID=' + productID);
$('#linkStoriesAndBugs').load(link);
}
+2 -2
View File
@@ -27,6 +27,6 @@ $lang->release->desc = 'Desc';
$lang->release->linkStoriesAndBugs = 'Stories and bugs';
$lang->release->linkStories = 'Stories';
$lang->release->linkBugs = 'Bugs';
$lang->release->linkedStories = 'Linked stories';
$lang->release->linkedBugs = 'Linked bugs';
$lang->release->stories = 'Linked stories';
$lang->release->bugs = 'Linked bugs';
$lang->release->ajaxGetStoriesAndBugs = 'API: Get storeis and bugs';
+2 -2
View File
@@ -27,6 +27,6 @@ $lang->release->desc = '描述';
$lang->release->linkStoriesAndBugs = '需求和Bug';
$lang->release->linkStories = '相关需求';
$lang->release->linkBugs = '相关Bug';
$lang->release->linkedStories = '已关联需求';
$lang->release->linkedBugs = '已关联Bugs';
$lang->release->stories = '已关联需求';
$lang->release->bugs = '已关联Bugs';
$lang->release->ajaxGetStoriesAndBugs = '接口:获得需求和Bug';
+2
View File
@@ -82,6 +82,8 @@ class releaseModel extends model
{
$oldRelease = $this->getByID($releaseID);
$release = fixer::input('post')->stripTags('name')->join('stories', ',')->join('bugs', ',')->get();
if(empty($release->stories)) $release->stories = '';
if(empty($release->bugs)) $release->bugs = '';
$this->dao->update(TABLE_RELEASE)->data($release)
->autoCheck()
->batchCheck($this->config->release->edit->requiredFields, 'notempty')
+18 -2
View File
@@ -30,20 +30,28 @@
<td><?php echo $release->date;?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->release->linkedStories;?></th>
<th class='rowhead'><?php echo $lang->release->stories;?></th>
<td>
<div style="height:225px; overflow-y:auto">
<table class='table-1'>
<tr>
<th class='w-id'><?php echo $lang->idAB;?></th>
<th class='w-pri'><?php echo $lang->priAB;?></th>
<th><?php echo $lang->story->title;?></th>
<th class='w-user'><?php echo $lang->openedByAB;?></th>
<th class='w-hour'><?php echo $lang->story->estimateAB;?></th>
<th class='w-hour'><?php echo $lang->statusAB;?></th>
<th class='w-100px'><?php echo $lang->story->stageAB;?></th>
</tr>
<?php foreach($stories as $storyID => $story):?>
<?php $storyLink = $this->createLink('story', 'view', "storyID=$storyID");?>
<tr class='a-center'>
<td><?php echo sprintf('%03d', $story->id);?></td>
<td><?php echo $lang->story->priList[$story->pri];?></td>
<td class='a-left nobr'><?php echo html::a($storyLink,$story->title);?></td>
<td><?php echo $users[$story->openedBy];?></td>
<td><?php echo $story->estimate;?></td>
<td class='<?php echo $story->status;?>'><?php echo $lang->story->statusList[$story->status];?></td>
<td><?php echo $lang->story->stageList[$story->stage];?></td>
</tr>
<?php endforeach;?>
@@ -52,7 +60,7 @@
</td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->release->linkedBugs;?></th>
<th class='rowhead'><?php echo $lang->release->bugs;?></th>
<td>
<div style="height:225px; overflow-y:auto">
<table class='table-1'>
@@ -60,12 +68,20 @@
<th class='w-id'> <?php echo $lang->idAB;?></th>
<th><?php echo $lang->bug->title;?></th>
<th class='w-100px'><?php echo $lang->bug->status;?></th>
<th class='w-user'><?php echo $lang->openedByAB;?></th>
<th class='w-date'><?php echo $lang->bug->openedDateAB;?></th>
<th class='w-user'><?php echo $lang->bug->resolvedByAB;?></th>
<th class='w-date'><?php echo $lang->bug->resolvedDateAB;?></th>
</tr>
<?php foreach($bugs as $bug):?>
<tr class='a-center'>
<td><?php echo sprintf('%03d', $bug->id);?></td>
<td class='a-left nobr'><?php common::printLink('bug', 'view', "bugID=$bug->id", $bug->title, '', "class='preview'");?></td>
<td><?php echo $lang->bug->statusList[$bug->status];?></td>
<td><?php echo $users[$bug->openedBy];?></td>
<td><?php echo substr($bug->openedDate, 5, 11)?></td>
<td><?php echo $users[$bug->resolvedBy];?></td>
<td><?php echo substr($bug->resolvedDate, 5, 11)?></td>
</tr>
<?php endforeach;?>
</table>