* Add issue block.
This commit is contained in:
@@ -1001,7 +1001,6 @@ class block extends control
|
||||
->andWhere('parent')->lt(1)
|
||||
->fetch();
|
||||
|
||||
|
||||
$this->view->pv = $this->weekly->getPV($this->session->program, $today);
|
||||
$this->view->ev = $this->weekly->getEV($this->session->program, $today);
|
||||
$this->view->ac = $this->weekly->getAC($this->session->program, $today);
|
||||
@@ -1034,6 +1033,7 @@ class block extends control
|
||||
$uri = $this->app->getURI(true);
|
||||
$this->session->set('riskList', $uri);
|
||||
if(preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die();
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->issues = $this->loadModel('issue')->getBlockIssues($this->params->type, $this->viewType == 'json' ? 0 : (int)$this->params->num, null, $this->params->orderBy);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,11 +15,12 @@
|
||||
<tr>
|
||||
<th class='c-id'><?php echo $lang->idAB;?></th>
|
||||
<th class='w-100px'><?php echo $lang->issue->type;?></th>
|
||||
<th class='c-name'> <?php echo $lang->issue->name;?></th>
|
||||
<th class='c-name'> <?php echo $lang->issue->title;?></th>
|
||||
<?php if($longBlock):?>
|
||||
<th class='c-severity'><?php echo $lang->issue->severity;?></th>
|
||||
<th class='c-pri'><?php echo $lang->issue->pri;?></th>
|
||||
<th class='w-80px'><?php echo $lang->issue->severity;?></th>
|
||||
<th class='w-80px'><?php echo $lang->issue->pri;?></th>
|
||||
<?php endif;?>
|
||||
<th class='w-120px'><?php echo $lang->issue->owner;?></th>
|
||||
<th class='w-120px'><?php echo $lang->issue->assignedTo;?></th>
|
||||
<th class='w-80px'><?php echo $lang->issue->status;?></th>
|
||||
</tr>
|
||||
@@ -32,11 +33,12 @@
|
||||
<tr>
|
||||
<td class='c-id-xs'><?php echo sprintf('%03d', $issue->id);?></td>
|
||||
<td class='c-type'><?php echo zget($lang->issue->typeList, $issue->type);?></td>
|
||||
<td class='c-name' title='<?php echo $issue->name?>'><?php echo $issue->name?></td>
|
||||
<td class='c-name' title='<?php echo $issue->title?>'><?php echo html::a($viewLink, $issue->title);?></td>
|
||||
<?php if($longBlock):?>
|
||||
<td class='c-severity'><?php echo zget($lang->issue->severityList, $issue->severity, $issue->severity)?></td>
|
||||
<td class='c-pri'><span class='label-pri label-pri-<?php echo $issue->pri;?>' title='<?php echo zget($lang->issue->priList, $issue->pri, $issue->pri)?>'><?php echo zget($lang->issue->priList, $issue->pri, $issue->pri)?></span></td>
|
||||
<?php endif;?>
|
||||
<td><?php echo zget($users, $issue->owner, $issue->owner)?></td>
|
||||
<td><?php echo zget($users, $issue->assignedTo, $issue->assignedTo)?></td>
|
||||
<td class='c-status'>
|
||||
<span class="status-issue status-<?php echo $issue->status?>"><?php echo zget($lang->issue->statusList, $issue->status);?></span>
|
||||
|
||||
@@ -51,11 +51,11 @@ $lang->issue->priList['2'] = 2;
|
||||
$lang->issue->priList['3'] = 3;
|
||||
$lang->issue->priList['4'] = 4;
|
||||
|
||||
$lang->issue->serverityList[''] = '';
|
||||
$lang->issue->serverityList['1'] = '严重';
|
||||
$lang->issue->serverityList['2'] = '较严重';
|
||||
$lang->issue->serverityList['3'] = '较小';
|
||||
$lang->issue->serverityList['4'] = '建议';
|
||||
$lang->issue->severityList[''] = '';
|
||||
$lang->issue->severityList['1'] = '严重';
|
||||
$lang->issue->severityList['2'] = '较严重';
|
||||
$lang->issue->severityList['3'] = '较小';
|
||||
$lang->issue->severityList['4'] = '建议';
|
||||
|
||||
$lang->issue->typeList[''] = '';
|
||||
$lang->issue->typeList['design'] = '设计问题';
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<?php echo html::select("dataList[$i][type]", $lang->issue->typeList, '', 'class="form-control chosen chosen-controled" id="dataList'.$i.'type"')?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo html::select("dataList[$i][severity]", $lang->issue->serverityList, '', 'class="form-control chosen chosen-controled" id="dataList'.$i.'severity"')?>
|
||||
<?php echo html::select("dataList[$i][severity]", $lang->issue->severityList, '', 'class="form-control chosen chosen-controled" id="dataList'.$i.'severity"')?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo html::textarea("dataList[$i][desc]", '', 'class="form-control" id="dataList'.$i.'desc" rows="1"');?>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->issue->severity;?></th>
|
||||
<td class="required"><?php echo html::select('severity', $lang->issue->serverityList, '', 'class="form-control chosen"');?></td>
|
||||
<td class="required"><?php echo html::select('severity', $lang->issue->severityList, '', 'class="form-control chosen"');?></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->issue->severity;?></th>
|
||||
<td class="required"><?php echo html::select('severity', $lang->issue->serverityList, $issue->severity, 'class="form-control chosen"');?></td>
|
||||
<td class="required"><?php echo html::select('severity', $lang->issue->severityList, $issue->severity, 'class="form-control chosen"');?></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
+13
-12
@@ -112,12 +112,13 @@ class weeklyModel extends model
|
||||
$sunday = $this->getThisSunday($date);
|
||||
$projects = $this->loadModel('project')->getList($status = 'all', $limit = 0, $productID = 0, $branch = 0, $type = 'project', $program);
|
||||
$projectIdList = array_keys($projects);
|
||||
return $this->dao->select('count(distinct account) as count')
|
||||
->from(TABLE_EFFORT)
|
||||
->where('objectType')->eq('task')
|
||||
->andWhere('project')->in($projectIdList)
|
||||
->andWhere('date')->ge($monday)
|
||||
->andWhere('date')->le($sunday)
|
||||
|
||||
return $this->dao->select('count(distinct t1.account) as count')
|
||||
->from(TABLE_TASKESTIMATE)->alias('t1')
|
||||
->leftJoin(TABLE_TASK)->alias('t2')->on('t1.task=t2.id')
|
||||
->where('t2.project')->in($projectIdList)
|
||||
->andWhere('t1.date')->ge($monday)
|
||||
->andWhere('t1.date')->lt($sunday)
|
||||
->fetch('count');
|
||||
}
|
||||
|
||||
@@ -312,12 +313,12 @@ class weeklyModel extends model
|
||||
$projects = $this->loadModel('project')->getList($status = 'all', $limit = 0, $productID = 0, $branch = 0, $type = 'project', $program);
|
||||
$projectIdList = array_keys($projects);
|
||||
|
||||
$AC = $this->dao->select('sum(consumed) as consumed')
|
||||
->from(TABLE_EFFORT)
|
||||
->where('objectType')->eq('task')
|
||||
->andWhere('project')->in($projectIdList)
|
||||
->andWhere('date')->ge($monday)
|
||||
->andWhere('date')->lt($nextMonday)
|
||||
$AC = $this->dao->select('sum(t1.consumed) as consumed')
|
||||
->from(TABLE_TASKESTIMATE)->alias('t1')
|
||||
->leftJoin(TABLE_TASK)->alias('t2')->on('t1.task=t2.id')
|
||||
->where('t2.project')->in($projectIdList)
|
||||
->andWhere('t1.date')->ge($monday)
|
||||
->andWhere('t1.date')->lt($nextMonday)
|
||||
->fetch('consumed');
|
||||
|
||||
return round($AC, 2);
|
||||
|
||||
Reference in New Issue
Block a user