* Fix bug #3758.
This commit is contained in:
@@ -446,7 +446,7 @@ class project extends control
|
||||
$toProject = $project->id;
|
||||
$branches = $this->project->getExecutionBranches($toProject);
|
||||
$tasks = $this->project->getTasks2Imported($toProject, $branches);
|
||||
$projects = $this->project->getExecutionsToImport(array_keys($tasks));
|
||||
$projects = $this->project->getExecutionsToImport(array_keys($tasks), $project->type);
|
||||
unset($projects[$toProject]);
|
||||
unset($tasks[$toProject]);
|
||||
|
||||
|
||||
@@ -1710,21 +1710,23 @@ class projectModel extends model
|
||||
* Get executions to import
|
||||
*
|
||||
* @param array $executionIds
|
||||
* @param string $type sprint|stage
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getExecutionsToImport($executionIds)
|
||||
public function getExecutionsToImport($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] = ucfirst(substr($execution->code, 0, 1)) . ':' . $execution->name;
|
||||
foreach($executions as $id => $execution) $pairs[$id] = $execution->name;
|
||||
return $pairs;
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
</div>
|
||||
<?php printf('%03d', $task->id);?>
|
||||
</td>
|
||||
<td><?php echo substr($projects[$task->project], 2);?></td>
|
||||
<td><?php echo substr($projects[$task->project], 0);?></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>
|
||||
|
||||
Reference in New Issue
Block a user