* code for task #78911
This commit is contained in:
@@ -322,6 +322,7 @@ class build extends control
|
||||
$this->view->type = $type;
|
||||
$this->view->bugPager = $bugPager;
|
||||
$this->view->branchName = $build->productType == 'normal' ? '' : $this->loadModel('branch')->getById($build->branch);
|
||||
$this->view->childBuilds = empty($build->builds) ? array() : $this->dao->select('id,name,bugs,stories')->from(TABLE_BUILD)->where('id')->in($build->builds)->fetchAll();
|
||||
|
||||
if($this->app->getViewType() == 'json')
|
||||
{
|
||||
|
||||
@@ -628,8 +628,8 @@ class buildModel extends model
|
||||
{
|
||||
$build->allBugs = $build->bugs;
|
||||
$build->allStories = $build->stories;
|
||||
$childBuilds = $this->dao->select('bugs, stories')->from(TABLE_BUILD)->where('id')->in($build->builds)->fetchAll();
|
||||
|
||||
$childBuilds = $this->dao->select('id,name,bugs,stories')->from(TABLE_BUILD)->where('id')->in($build->builds)->fetchAll();
|
||||
foreach($childBuilds as $childBuild)
|
||||
{
|
||||
if($childBuild->bugs) $build->allBugs .= ",{$childBuild->bugs}";
|
||||
@@ -687,7 +687,7 @@ class buildModel extends model
|
||||
{
|
||||
$executionID = $tab == 'execution' ? $extraParams['executionID'] : $build->execution;
|
||||
$execution = $this->loadModel('execution')->getByID($executionID);
|
||||
$build->executionDeleted = $execution ? $execution->deleted : 0;
|
||||
$build->executionDeleted = $execution ? $execution->deleted : 0;
|
||||
|
||||
$testtaskApp = (!empty($execution->type) and $execution->type == 'kanban') ? 'data-app="qa"' : "data-app='{$tab}'";
|
||||
|
||||
|
||||
@@ -88,8 +88,11 @@ tbody tr td:first-child input {display: none;}
|
||||
<?php endif;?>
|
||||
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
|
||||
</th>
|
||||
<th class='c-id' title=<?php echo $lang->pri;?>><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='c-pri' title=<?php echo $lang->pri;?>><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='text-left'><?php common::printOrderLink('title', $orderBy, $vars, $lang->story->title);?></th>
|
||||
<?php if($childBuilds):?>
|
||||
<th class='c-build w-200px text-left'><?php echo $lang->build->common;?></th>
|
||||
<?php endif;?>
|
||||
<th class='c-user'><?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
|
||||
<th class='c-id text-right'><?php common::printOrderLink('estimate', $orderBy, $vars, $lang->story->estimateAB);?></th>
|
||||
<th class='c-status'><?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
|
||||
@@ -99,7 +102,21 @@ tbody tr td:first-child input {display: none;}
|
||||
</thead>
|
||||
<tbody class='text-center'>
|
||||
<?php foreach($stories as $storyID => $story):?>
|
||||
<?php $unlinkClass = strpos(",$build->stories,", ",$story->id,") !== false ? '' : "disabled";?>
|
||||
<?php
|
||||
$unlinkClass = strpos(",$build->stories,", ",$story->id,") !== false ? '' : "disabled";
|
||||
$buildName = $build->name;
|
||||
if($unlinkClass == 'disabled')
|
||||
{
|
||||
foreach($childBuilds as $childBuild)
|
||||
{
|
||||
if(strpos(",$childBuild->stories,", ",$story->id,") !== false)
|
||||
{
|
||||
$buildName = $childBuild->name;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td class='c-id text-left'>
|
||||
<?php if($canBatchUnlink):?>
|
||||
@@ -130,6 +147,9 @@ tbody tr td:first-child input {display: none;}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<?php if($childBuilds):?>
|
||||
<td class='text-left' title='<?php echo $buildName?>'><?php echo $buildName;?></td>
|
||||
<?php endif;?>
|
||||
<td><?php echo zget($users, $story->openedBy);?></td>
|
||||
<td class='text-right' title="<?php echo $story->estimate . ' ' . $lang->hourCommon;?>"><?php echo $story->estimate . $config->hourUnit;?></td>
|
||||
<td>
|
||||
@@ -189,6 +209,9 @@ tbody tr td:first-child input {display: none;}
|
||||
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
|
||||
</th>
|
||||
<th class='text-left'> <?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
|
||||
<?php if($childBuilds):?>
|
||||
<th class='c-build w-200px text-left'><?php echo $lang->build->common?></th>
|
||||
<?php endif;?>
|
||||
<th class='c-status'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->bug->status);?></th>
|
||||
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
|
||||
<th class='c-date'> <?php common::printOrderLink('openedDate', $orderBy, $vars, $lang->bug->openedDateAB);?></th>
|
||||
@@ -200,7 +223,21 @@ tbody tr td:first-child input {display: none;}
|
||||
<tbody class='text-center'>
|
||||
<?php foreach($bugs as $bug):?>
|
||||
<?php $bugLink = $this->createLink('bug', 'view', "bugID=$bug->id", '', true);?>
|
||||
<?php $unlinkClass = strpos(",$build->bugs,", ",$bug->id,") !== false ? '' : "disabled";?>
|
||||
<?php
|
||||
$unlinkClass = strpos(",$build->bugs,", ",$bug->id,") !== false ? '' : "disabled";
|
||||
$buildName = $build->name;
|
||||
if($unlinkClass == 'disabled')
|
||||
{
|
||||
foreach($childBuilds as $childBuild)
|
||||
{
|
||||
if(strpos(",$childBuild->bugs,", ",$bug->id,") !== false)
|
||||
{
|
||||
$buildName = $childBuild->name;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td class='c-id text-left'>
|
||||
<?php if($canBatchUnlink):?>
|
||||
@@ -211,6 +248,9 @@ tbody tr td:first-child input {display: none;}
|
||||
<td class='text-left nobr' title='<?php echo $bug->title?>'>
|
||||
<?php echo html::a($bugLink, $bug->title, '', isonlybody() ? "data-width='1000'" : "class='iframe' data-width='1000'");?>
|
||||
</td>
|
||||
<?php if($childBuilds):?>
|
||||
<td class='text-left' title='<?php echo $buildName?>'><?php echo $buildName;?></td>
|
||||
<?php endif;?>
|
||||
<td>
|
||||
<span class='status-bug status-<?php echo $bug->status?>'>
|
||||
<?php echo $this->processStatus('bug', $bug);?>
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="c-id-sm"><?php echo $lang->build->id;?></th>
|
||||
<th class="c-name w-250px text-left"><?php echo $lang->build->name;?></th>
|
||||
<th class="c-name text-left"><?php echo $lang->build->name;?></th>
|
||||
<?php if($project->hasProduct):?>
|
||||
<th class="c-name w-150px text-left"><?php echo $lang->build->product;?></th>
|
||||
<?php endif;?>
|
||||
@@ -56,8 +56,8 @@
|
||||
<th class="c-name w-150px text-left"><?php echo $lang->executionCommon;?></th>
|
||||
<?php endif;?>
|
||||
<th class="c-url w-300px text-left"><?php echo $lang->build->url;?></th>
|
||||
<th class="c-date"><?php echo $lang->build->date;?></th>
|
||||
<th class="c-user"><?php echo $lang->build->builder;?></th>
|
||||
<th class="c-date w-90px"><?php echo $lang->build->date;?></th>
|
||||
<th class="c-user w-70px"><?php echo $lang->build->builder;?></th>
|
||||
<th class="c-actions-5"><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
Reference in New Issue
Block a user