Merge branch 'sprint/167_xieqiyu_43173' into 'sprint/167'
* Finish task#43173. See merge request easycorp/zentaopms!55
This commit is contained in:
@@ -98,8 +98,9 @@ class reportModel extends model
|
||||
*/
|
||||
public function getExecutions($begin = 0, $end = 0)
|
||||
{
|
||||
$tasks = $this->dao->select('t1.*,t2.name as executionName')->from(TABLE_TASK)->alias('t1')
|
||||
$tasks = $this->dao->select('t1.*, t2.name as executionName, t3.name as projectName')->from(TABLE_TASK)->alias('t1')
|
||||
->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t1.execution = t2.id')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t3')->on('t1.project = t3.id')
|
||||
->where('t1.status')->ne('cancel')
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->sprints)->fi()
|
||||
@@ -122,9 +123,10 @@ class reportModel extends model
|
||||
$executions[$executionID]->consumed = 0;
|
||||
}
|
||||
|
||||
$executions[$executionID]->name = $task->executionName;
|
||||
$executions[$executionID]->estimate += $task->estimate;
|
||||
$executions[$executionID]->consumed += $task->consumed;
|
||||
$executions[$executionID]->projectName = $task->projectName;
|
||||
$executions[$executionID]->name = $task->executionName;
|
||||
$executions[$executionID]->estimate += $task->estimate;
|
||||
$executions[$executionID]->consumed += $task->consumed;
|
||||
}
|
||||
|
||||
return $executions;
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
<thead>
|
||||
<tr class='colhead'>
|
||||
<th class='c-id'><?php echo $lang->report->id;?></th>
|
||||
<th><?php echo $lang->report->project;?></th>
|
||||
<th><?php echo $lang->report->execution;?></th>
|
||||
<th class="c-hours"><?php echo $lang->report->estimate;?></th>
|
||||
<th class="c-hours"><?php echo $lang->report->consumed;?></th>
|
||||
@@ -56,6 +57,7 @@
|
||||
<?php foreach($executions as $id =>$execution):?>
|
||||
<tr class="text-center">
|
||||
<td><?php echo $id;?></td>
|
||||
<td class="text-left" title="<?php echo $execution->projectName;?>"><?php echo $execution->projectName;?></td>
|
||||
<td class="text-left" title="<?php echo $execution->name;?>"><?php echo html::a($this->createLink('execution', 'view', "executionID=$id"), $execution->name);?></td>
|
||||
<td><?php echo $execution->estimate;?></td>
|
||||
<td><?php echo $execution->consumed;?></td>
|
||||
|
||||
Reference in New Issue
Block a user