* Fix bug #19255.
This commit is contained in:
@@ -815,6 +815,10 @@ class bug extends control
|
||||
$bug = $this->bug->getById($bugID, true);
|
||||
if(!$bug) return print(js::error($this->lang->notFound) . js::locate($this->createLink('qa', 'index')));
|
||||
|
||||
$projectID = $bug->project;
|
||||
$project = new stdclass();
|
||||
$project = $this->loadModel('project')->getByID($projectID);
|
||||
|
||||
$this->session->set('storyList', '', 'product');
|
||||
$this->session->set('projectList', $this->app->getURI(true) . "#app={$this->app->tab}", 'project');
|
||||
$this->bug->checkBugExecutionPriv($bug);
|
||||
@@ -856,6 +860,7 @@ class bug extends control
|
||||
$this->view->position[] = $this->lang->bug->view;
|
||||
|
||||
/* Assign. */
|
||||
$this->view->project = $project;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->branches = $branches;
|
||||
$this->view->modulePath = $this->tree->getParents($bug->module);
|
||||
@@ -2242,4 +2247,19 @@ class bug extends control
|
||||
foreach($teamMembers as $account => $member) $teamMembers[$account] = $users[$account];
|
||||
die(html::select('assignedTo', $teamMembers, '', 'class="form-control"'));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Ajax get execution lang.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function ajaxGetExecutionLang($projectID)
|
||||
{
|
||||
$project = $this->loadModel('project')->getByID($projectID);
|
||||
if($project->model == 'kanban') return print($this->lang->bug->kanban);
|
||||
if($project->model != 'kanban') return print($this->lang->bug->execution);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,16 @@ $(function()
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$('#project').change(function()
|
||||
{
|
||||
var projectID = $('#project').val();
|
||||
var link = createLink('bug', 'ajaxGetExecutionLang', 'projectID=' + projectID);
|
||||
$.post(link, function(executionLang)
|
||||
{
|
||||
$('#executionBox').html(executionLang);
|
||||
})
|
||||
})
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
@@ -194,7 +194,7 @@ if($this->app->tab == 'project') js::set('objectID', $bug->project);
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th class='w-85px'><?php echo $lang->bug->execution;?></th>
|
||||
<th class='w-85px' id='executionBox'><?php echo $lang->bug->execution;?></th>
|
||||
<td><span id='executionIdBox'><?php echo html::select('execution', $executions, $bug->execution, "class='form-control chosen' onchange='loadExecutionRelated(this.value)'");?></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -281,7 +281,7 @@
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th class='w-70px'><?php echo $lang->bug->execution;?></th>
|
||||
<th class='w-70px'><?php echo (isset($project->model) and $project->model == 'kanban') ? $lang->bug->kanban : $lang->bug->execution;?></th>
|
||||
<td><?php if($bug->execution) echo html::a($this->createLink('execution', 'browse', "executionID=$bug->execution"), $bug->executionName);?></td>
|
||||
</tr>
|
||||
<tr class='nofixed'>
|
||||
|
||||
Reference in New Issue
Block a user