allowed the new issue form to select an issue owner

This commit is contained in:
hyung-hwan 2016-07-02 15:17:35 +00:00
parent c764164a49
commit 37b6afd896
2 changed files with 18 additions and 1 deletions

View File

@ -273,7 +273,13 @@ class Issue extends Controller
$issue->type = $this->input->post('issue_new_type');
$issue->status = $this->issuehelper->STATUS_NEW;
$issue->priority = $this->issuehelper->PRIORITY_OTHER;
if ($this->projects->projectHasMember($project->id, $login['id']))
$owner_candidate = $this->input->post('issue_new_owner');
if ($this->projects->projectHasMember($project->id, $owner_candidate))
{
$issue->owner = $owner_candidate;
}
else if ($this->projects->projectHasMember($project->id, $login['id']))
{
// let the current user be the issue owner if he/she is a
// project memeber.

View File

@ -173,6 +173,7 @@ $(function () {
form_data.append ('issue_new_file_count', f_no);
form_data.append ('issue_new_type', $('#issue_home_new_type').val());
form_data.append ('issue_new_owner', $('#issue_home_new_owner').val());
form_data.append ('issue_new_summary', $('#issue_home_new_summary').val());
form_data.append ('issue_new_description', $('#issue_home_new_description').val());
@ -399,6 +400,16 @@ else
set_value('issue_home_new_type', ''),
'id="issue_home_new_type"'
);
print ' ';
$tmpmemb = array();
foreach ($project->members as $m) $tmpmemb[$m] = $m;
print form_dropdown (
'issue_home_new_owner',
$tmpmemb,
set_value('issue_home_new_owner', (in_array($login['id'], $project->members)? $login['id']: '')),
'id="issue_home_new_owner"'
);
?>
<input type='text' id='issue_home_new_summary' name='issue_home_new_summary' size='50' placeholder='<?php print $this->lang->line('Summary'); ?>'/>