* Add project name

This commit is contained in:
zenggang
2022-05-19 07:03:55 +00:00
parent fd977ff822
commit 463ff11e9d
3 changed files with 10 additions and 14 deletions
+1 -1
View File
@@ -1,2 +1,2 @@
#fromproject_chosen .chosen-single {width: 220px;}
.c-name {width: 150px;}
.c-name {width: 200px;}
+8 -12
View File
@@ -1929,18 +1929,14 @@ class executionModel extends model
*/
public function getToImport($executionIds, $type)
{
$executions = $this->dao->select('*')->from(TABLE_EXECUTION)
->where('id')->in($executionIds)
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->sprints)->fi()
->andWhere('type')->eq($type)
->andWhere('deleted')->eq(0)
->orderBy('id desc')
->fetchAll('id');
$pairs = array();
$now = date('Y-m-d');
foreach($executions as $id => $execution) $pairs[$id] = $execution->name;
return $pairs;
return $this->dao->select('t1.id,concat_ws(" / ", t2.name, t1.name) as name')->from(TABLE_EXECUTION)->alias('t1')
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t2.id=t1.project')
->where('t1.id')->in($executionIds)
->beginIF(!$this->app->user->admin)->andWhere('t1.id')->in($this->app->user->view->sprints)->fi()
->andWhere('t1.type')->eq($type)
->andWhere('t1.deleted')->eq(0)
->orderBy('t1.id desc')
->fetchPairs('id', 'name');
}
/**
+1 -1
View File
@@ -53,7 +53,7 @@
</div>
<?php printf('%03d', $task->id);?>
</td>
<td><?php echo $executions[$task->execution];?></td>
<td title="<?php echo $executions[$task->execution];?>"><?php echo $executions[$task->execution];?></td>
<td><span class='label-pri label-pri-<?php echo $task->pri;?>' title='<?php echo zget($lang->task->priList, $task->pri, $task->pri);?>'><?php echo $task->pri == '0' ? '' : zget($lang->task->priList, $task->pri, $task->pri);?></span></td>
<td class='text-left nobr'><?php if(!common::printLink('task', 'view', "task=$task->id", $task->name)) echo $task->name;?></td>
<td <?php echo $class;?>><?php echo $task->assignedToRealName;?></td>