* Finish Task #78673

This commit is contained in:
lanzongjun
2022-12-07 11:23:57 +08:00
parent a0c48aa7c0
commit 125610f6c5
4 changed files with 23 additions and 3 deletions
+2 -1
View File
@@ -2,6 +2,7 @@
#releaseList tr:hover {background-color:unset;}
td {overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
.c-build {width: 250px;}
.c-build {width: 300px;}
.c-branch {width: 200px;}
td.c-build {padding-left:8px !important;}
.c-product, .c-execution {width: 120px;}
+14 -1
View File
@@ -70,7 +70,20 @@ class projectreleaseModel extends model
{
$release->project = trim($release->project, ',');
$release->branch = trim($release->branch, ',');
$release->build = trim($release->build, ',');
$branchName = '';
if($release->branch != 'normal')
{
foreach(explode(',', $release->branch) as $releaseBranch)
{
$branchName .= $this->loadModel('branch')->getById($releaseBranch);
$branchName .= ',';
}
$branchName = trim($branchName, ',');
}
$release->branchName = empty($branchName) ? $this->lang->branch->main : $branchName;
$release->build = trim($release->build, ',');
$buildIdList = array_merge($buildIdList, explode(',', $release->build));
}
@@ -53,6 +53,7 @@
<th class='c-product'><?php echo $lang->projectrelease->product;?></th>
<?php endif;?>
<th class='c-build'><?php echo $lang->release->includedBuild;?></th>
<th class='c-branch text-center'><?php echo $lang->release->branch;?></th>
<th class='c-status text-center'><?php echo $lang->release->status;?></th>
<th class='c-date text-center'><?php echo $lang->release->date;?></th>
<?php
@@ -87,6 +88,7 @@
<td class='c-build'><?php if($buildCount) echo html::a($this->createLink($build->execution ? 'build' : 'projectbuild', 'view', "buildID=$buildID"), $build->name, '', "data-app='project' title='<?php echo $build->name;?>'");?></td>
<?php if($i == 0):?>
<?php $status = $this->processStatus('release', $release);?>
<td <?php echo $rowspan?> class='c-branch text-center'><?php echo $release->branchName; ?></td>
<td <?php echo $rowspan?> class='c-status text-center' title='<?php echo $status;?>'>
<span class="status-release status-<?php echo $release->status?>"><?php echo $status;?></span>
</td>
+5 -1
View File
@@ -222,7 +222,11 @@ class releaseModel extends model
if($linkedBuilds) $builds += $this->dao->select('id,project,branch,builds,stories,bugs')->from(TABLE_BUILD)->where('id')->in($linkedBuilds)->fetchAll('id');
foreach($builds as $build)
{
$branches[$build->branch] = $build->branch;
foreach(explode(',', $build->branch) as $buildBranch)
{
if(!isset($branches[$buildBranch])) $branches[$buildBranch] = $buildBranch;
}
$projects[$build->project] = $build->project;
if($this->post->sync)