* Finish task #61174, #61175.

This commit is contained in:
liumengyi
2022-07-18 14:08:56 +08:00
parent ee7479b9d5
commit fc00015a6d
12 changed files with 80 additions and 2 deletions
+17
View File
@@ -178,6 +178,23 @@ class buildModel extends model
return $this->getExecutionBuilds($executionID, 'bysearch', $buildQuery);
}
/**
* Get story builds.
*
* @param int $storyID
* @access public
* @return array
*/
public function getStoryBuilds($storyID)
{
return $this->dao->select('*')->from(TABLE_BUILD)
->where('deleted')->eq(0)
->andWhere('stories', true)->like("%,$storyID,%")
->orWhere('stories')->like("%,$storyID")->markRight(1)
->orderBy('id_desc')
->fetchAll('id');
}
/**
* Get builds in pairs.
*
+17
View File
@@ -103,6 +103,23 @@ class releaseModel extends model
return array_keys($releases);
}
/**
* Get story releases.
*
* @param int $storyID
* @access public
* @return array
*/
public function getStoryReleases($storyID)
{
return $this->dao->select('*')->from(TABLE_RELEASE)
->where('deleted')->eq(0)
->andWhere('stories', true)->like("%,$storyID,%")
->orWhere('stories')->like("%,$storyID")->markRight(1)
->orderBy('id_desc')
->fetchAll('id');
}
/**
* Create a release.
*
+2
View File
@@ -1282,6 +1282,8 @@ class story extends control
$this->view->preAndNext = $this->loadModel('common')->getPreAndNextObject('story', $storyID);
$this->view->from = $from;
$this->view->param = $param;
$this->view->builds = $this->loadModel('build')->getStoryBuilds($storyID);
$this->view->releases = $this->loadModel('release')->getStoryReleases($storyID);
$this->display();
}
+1
View File
@@ -3,3 +3,4 @@
#legendStories ul li {padding: 10px 0 0 12px; line-height: 20px;}
.main-actions .btn-toolbar .btn {padding-right: 6px; padding-left: 6px;}
.btn-edit-comment {z-index: 100;}
#legendRelated .table-data tbody>tr>th {width: 90px;}
+1
View File
@@ -0,0 +1 @@
#legendRelated .table-data tbody>tr>th {width: 125px;}
+1
View File
@@ -1,2 +1,3 @@
#legendLifeTime .thWidth {width: 100px !important;}
#legendRelated .thWidth {width: 110px !important;}
#legendRelated .table-data tbody>tr>th {width: 105px;}
+1
View File
@@ -0,0 +1 @@
#legendRelated .table-data tbody>tr>th {width: 95px;}
+2
View File
@@ -247,6 +247,8 @@ $lang->story->legendBugs = 'Verküpfte Bugs';
$lang->story->legendFromBug = 'Verküpfte Formular Bugs';
$lang->story->legendCases = 'Verküpfte Fälle';
$lang->story->legendLinkStories = 'Verküpfte Storys';
$lang->story->legendBuilds = 'Verkü pfte Builds';
$lang->story->legendReleases = 'Verkü pfte Releases';
$lang->story->legendChildStories = 'Story auteien';
$lang->story->legendSpec = 'Beschreibung';
$lang->story->legendVerify = 'Akzeptanz';
+2
View File
@@ -247,6 +247,8 @@ $lang->story->legendBugs = 'Linked Bugs';
$lang->story->legendFromBug = 'From Bug';
$lang->story->legendCases = 'Linked Cases';
$lang->story->legendLinkStories = 'Linked Stories';
$lang->story->legendBuilds = 'Linked Builds';
$lang->story->legendReleases = 'Linked Releases';
$lang->story->legendChildStories = 'Child Stories';
$lang->story->legendSpec = 'Description';
$lang->story->legendVerify = 'Acceptance';
+2
View File
@@ -246,6 +246,8 @@ $lang->story->legendProjectAndTask = $lang->executionCommon . ' et Tâches';
$lang->story->legendBugs = 'Bugs Liés';
$lang->story->legendFromBug = 'du Bug';
$lang->story->legendCases = 'CasTests Liés';
$lang->story->legendBuilds = 'Builds Lié s';
$lang->story->legendReleases = 'Releases Lié s';
$lang->story->legendLinkStories = 'Stories Liées';
$lang->story->legendChildStories = 'Sous-Stories';
$lang->story->legendSpec = 'Description';
+2
View File
@@ -246,6 +246,8 @@ $lang->story->legendProjectAndTask = $lang->executionCommon . '任务';
$lang->story->legendBugs = '相关Bug';
$lang->story->legendFromBug = '来源Bug';
$lang->story->legendCases = '相关用例';
$lang->story->legendBuilds = '相关版本';
$lang->story->legendReleases = '相关发布';
$lang->story->legendLinkStories = "相关{$lang->SRCommon}";
$lang->story->legendChildStories = "细分{$lang->SRCommon}";
$lang->story->legendSpec = "需求描述";
+32 -2
View File
@@ -456,7 +456,7 @@
<tbody>
<?php if(!empty($fromBug)):?>
<tr>
<th class='w-90px'><?php echo $lang->story->legendFromBug;?></th>
<th><?php echo $lang->story->legendFromBug;?></th>
<td class='pd-0'>
<ul class='list-unstyled'>
<?php echo "<li title='#$fromBug->id $fromBug->title'>" . html::a($this->createLink('bug', 'view', "bugID=$fromBug->id", '', true), "#$fromBug->id $fromBug->title", '', "class='iframe' data-width='80%'") . '</li>';?>
@@ -465,7 +465,7 @@
</tr>
<?php endif;?>
<tr>
<th class='w-90px'><?php echo $lang->story->legendBugs;?></th>
<th><?php echo $lang->story->legendBugs;?></th>
<td class='pd-0'>
<ul class='list-unstyled'>
<?php
@@ -492,6 +492,36 @@
</ul>
</td>
</tr>
<tr>
<th><?php echo $lang->story->legendBuilds;?></th>
<td class='pd-0'>
<ul class='list-unstyled'>
<?php
$misc = isonlybody() ? "showinonlybody" : "class='iframe' data-width='80%'";
foreach($builds as $build)
{
echo "<li title='$build->id $build->name'>" . html::a($this->createLink('build', 'view', "buildID=$build->id", '', true), "#$build->id $build->name", '', $misc) . '</li>';
}
?>
</ul>
</td>
</tr>
<tr>
<th><?php echo $lang->story->legendReleases;?></th>
<td class='pd-0'>
<ul class='list-unstyled'>
<?php
$misc = isonlybody() ? "showinonlybody" : "class='iframe' data-width='80%'";
foreach($releases as $release)
{
echo "<li title='$release->id $release->name'>" . html::a($this->createLink('release', 'view', "release=$release->id", '', true), "#$release->id $release->name", '', $misc) . '</li>';
}
?>
</ul>
</td>
</tr>
<tr>
<th><?php echo $lang->story->linkMR;?></th>
<td class='pd-0'>