* Finish task #70751.
This commit is contained in:
@@ -765,6 +765,7 @@ class block extends control
|
||||
$this->view->plans = $this->dao->select('t1.*,t2.name as productName')->from(TABLE_PRODUCTPLAN)->alias('t1')
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product=t2.id')
|
||||
->where('t1.deleted')->eq('0')
|
||||
->andWhere('t2.shadow')->eq(0)
|
||||
->beginIF(!$this->app->user->admin)->andWhere('t1.product')->in($this->app->user->view->products)->fi()
|
||||
->orderBy('t1.begin desc')
|
||||
->beginIF($this->viewType != 'json')->limit((int)$this->params->count)->fi()
|
||||
@@ -788,6 +789,7 @@ class block extends control
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product=t2.id')
|
||||
->leftJoin(TABLE_BUILD)->alias('t3')->on('t1.build=t3.id')
|
||||
->where('t1.deleted')->eq('0')
|
||||
->andWhere('t2.shadow')->eq(0)
|
||||
->beginIF($this->view->block->module != 'my' and $this->session->project)->andWhere('t1.project')->eq((int)$this->session->project)->fi()
|
||||
->beginIF(!$this->app->user->admin)->andWhere('t1.product')->in($this->app->user->view->products)->fi()
|
||||
->orderBy('t1.id desc')
|
||||
@@ -806,8 +808,9 @@ class block extends control
|
||||
$this->session->set('buildList', $this->createLink('my', 'index'), 'execution');
|
||||
$this->app->loadLang('build');
|
||||
|
||||
$builds = $this->dao->select('t1.*, t2.name as productName')->from(TABLE_BUILD)->alias('t1')
|
||||
$builds = $this->dao->select('t1.*, t2.name AS productName, t2.shadow, t3.name AS projectName')->from(TABLE_BUILD)->alias('t1')
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product=t2.id')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t3')->on('t1.project=t3.id')
|
||||
->where('t1.deleted')->eq('0')
|
||||
->beginIF(!$this->app->user->admin)->andWhere('t1.execution')->in($this->app->user->view->sprints)->fi()
|
||||
->beginIF($this->view->block->module != 'my' and $this->session->project)->andWhere('t1.project')->eq((int)$this->session->project)->fi()
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
<th class='c-id text-center'><?php echo $lang->idAB?></th>
|
||||
<?php if($longBlock):?>
|
||||
<th><?php echo $lang->build->product;?></th>
|
||||
<th><?php echo $lang->build->project;?></th>
|
||||
<?php endif;?>
|
||||
<th><?php echo $lang->build->name;?></th>
|
||||
<th class='c-date'><?php echo $lang->build->date;?></th>
|
||||
@@ -31,11 +32,13 @@
|
||||
$appid = isset($_GET['entry']) ? "class='app-btn' data-id='{$this->get->entry}'" : '';
|
||||
$buildViewLink = $this->createLink('build', 'view', "buildID={$build->id}");
|
||||
$productViewLink = $this->createLink('product', 'browse', "productID={$build->product}");
|
||||
$projectViewLink = $this->createLink('project', 'build', "projectID={$build->project}");
|
||||
?>
|
||||
<tr <?php echo $appid?>>
|
||||
<td class='text-center'><?php echo sprintf('%03d', $build->id);?></td>
|
||||
<?php if($longBlock):?>
|
||||
<td title='<?php echo $build->productName?>'><?php echo html::a($productViewLink, $build->productName);?></td>
|
||||
<td title='<?php echo $build->productName?>'><?php echo html::a($build->shadow ? $projectViewLink : $productViewLink, $build->productName);?></td>
|
||||
<td title='<?php echo $build->projectName?>'><?php echo html::a($projectViewLink, $build->projectName);?></td>
|
||||
<?php endif;?>
|
||||
<td title='<?php echo $build->name?>'><?php echo html::a($buildViewLink, $build->name);?></td>
|
||||
<td><?php echo $build->date?></td>
|
||||
|
||||
@@ -3493,15 +3493,16 @@ class storyModel extends model
|
||||
/**
|
||||
* Get stories of a user.
|
||||
*
|
||||
* @param string $account
|
||||
* @param string $type the query type
|
||||
* @param string $orderBy
|
||||
* @param object $pager
|
||||
* @param string $storyType requirement|story
|
||||
* @param string $account
|
||||
* @param string $type the query type
|
||||
* @param string $orderBy
|
||||
* @param object $pager
|
||||
* @param string $storyType requirement|story
|
||||
* @param string|int $shadow all | 0 | 1
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getUserStories($account, $type = 'assignedTo', $orderBy = 'id_desc', $pager = null, $storyType = 'story', $includeLibStories = true)
|
||||
public function getUserStories($account, $type = 'assignedTo', $orderBy = 'id_desc', $pager = null, $storyType = 'story', $includeLibStories = true, $shadow = 0)
|
||||
{
|
||||
$sql = $this->dao->select("t1.*, IF(t1.`pri` = 0, {$this->config->maxPriValue}, t1.`pri`) as priOrder, t2.name as productTitle")->from(TABLE_STORY)->alias('t1')
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id');
|
||||
@@ -3520,6 +3521,7 @@ class storyModel extends model
|
||||
->beginIF($type == 'closedBy')->andWhere('t1.closedBy')->eq($account)->fi()
|
||||
->fi()
|
||||
->beginIF($includeLibStories == false and $this->config->edition == 'max')->andWhere('t1.lib')->eq('0')->fi()
|
||||
->beginIF($shadow !== 'all')->andWhere('t2.shadow')->eq((int)$shadow)->fi()
|
||||
->orderBy($orderBy)
|
||||
->page($pager)
|
||||
->fetchAll('id');
|
||||
|
||||
Reference in New Issue
Block a user